From c83e2cb6f2fe042448ec7f27e3c16d6d2ae5f340 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Thu, 31 Oct 2024 17:01:27 +0800 Subject: [PATCH] Add module var for shutdown timeout --- Server/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Server/index.js b/Server/index.js index 3e083df50..e12d83a18 100644 --- a/Server/index.js +++ b/Server/index.js @@ -44,6 +44,7 @@ import NotificationService from "./service/notificationService.js"; import db from "./db/mongo/MongoDB.js"; const SERVICE_NAME = "Server"; +const SHUTDOWN_TIMEOUT = 0; let isShuttingDown = false; const __filename = fileURLToPath(import.meta.url); @@ -154,7 +155,7 @@ const startApp = async () => { method: "shutdown", }); process.exit(1); - }, 2000); + }, SHUTDOWN_TIMEOUT); try { server.close(); await jobQueue.obliterate();