Graceful job queue shutdown
This commit is contained in:
parent
8e0fd45e14
commit
14f2b3ad11
2 changed files with 13 additions and 0 deletions
|
@ -195,4 +195,10 @@ async function startApplication () {
|
|||
logger.info('Server listening on %s:%d', hostname, port)
|
||||
logger.info('Web server: %s', CONFIG.WEBSERVER.URL)
|
||||
})
|
||||
|
||||
process.on('exit', () => {
|
||||
JobQueue.Instance.terminate()
|
||||
})
|
||||
|
||||
process.on('SIGINT', () => process.exit(0))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue