From fd81f65e53dd002a13a801b24efc3e8eaccf1f42 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Wed, 17 Jan 2024 16:37:51 +0800 Subject: [PATCH] Remove server.close call --- packages/api/src/queue-processor.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/packages/api/src/queue-processor.ts b/packages/api/src/queue-processor.ts index 5b5a247eb..7fcc608fb 100644 --- a/packages/api/src/queue-processor.ts +++ b/packages/api/src/queue-processor.ts @@ -105,14 +105,9 @@ const main = async () => { const gracefulShutdown = async (signal: string) => { console.log(`[queue-processor]: Received ${signal}, closing server...`) - server.close(async () => { - console.log( - '[queue-processor]: Server closed. shuting down and exiting process...' - ) - await worker.close() - await redisDataSource.shutdown() - process.exit(0) - }) + await worker.close() + await redisDataSource.shutdown() + process.exit(0) } process.on('SIGINT', () => gracefulShutdown('SIGINT'))