summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/queue/index.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/queue/index.ts b/src/queue/index.ts
index 1efd6e54ef..53853687d7 100644
--- a/src/queue/index.ts
+++ b/src/queue/index.ts
@@ -12,6 +12,13 @@ const queue = createQueue({
}
});
+process.once('SIGTERM', () => {
+ queue.shutdown(5000, (err: any) => {
+ console.log('Kue shutdown: ', err || '');
+ process.exit(0);
+ });
+});
+
export function createHttp(data: any) {
return queue
.create('http', data)