aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-07-30 18:49:54 +0200
committerChocobozzz <me@florianbigard.com>2018-07-30 18:49:54 +0200
commit14f2b3ad1145595190ec515b3d8b23603d01281c (patch)
tree568d465d14ea62a6ad58da115cae42fc3d8d2567 /server.ts
parent8e0fd45e14993793c64e06682a4a05c29068d398 (diff)
downloadPeerTube-14f2b3ad1145595190ec515b3d8b23603d01281c.tar.gz
PeerTube-14f2b3ad1145595190ec515b3d8b23603d01281c.tar.zst
PeerTube-14f2b3ad1145595190ec515b3d8b23603d01281c.zip
Graceful job queue shutdown
Diffstat (limited to 'server.ts')
-rw-r--r--server.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/server.ts b/server.ts
index efbfd3c97..0e6f787a6 100644
--- a/server.ts
+++ b/server.ts
@@ -195,4 +195,10 @@ async function startApplication () {
195 logger.info('Server listening on %s:%d', hostname, port) 195 logger.info('Server listening on %s:%d', hostname, port)
196 logger.info('Web server: %s', CONFIG.WEBSERVER.URL) 196 logger.info('Web server: %s', CONFIG.WEBSERVER.URL)
197 }) 197 })
198
199 process.on('exit', () => {
200 JobQueue.Instance.terminate()
201 })
202
203 process.on('SIGINT', () => process.exit(0))
198} 204}