Add module var for shutdown timeout
This commit is contained in:
1 parent
3fc79d47ba
commit
c83e2cb6f2
1 file changed
+2
-1
+2
-1
@@ -44,6 +44,7 @@ import NotificationService from "./service/notificationService.js";
|
|||||||
|
|
||||||
import db from "./db/mongo/MongoDB.js";
|
import db from "./db/mongo/MongoDB.js";
|
||||||
const SERVICE_NAME = "Server";
|
const SERVICE_NAME = "Server";
|
||||||
|
const SHUTDOWN_TIMEOUT = 0;
|
||||||
|
|
||||||
let isShuttingDown = false;
|
let isShuttingDown = false;
|
||||||
const __filename = fileURLToPath(import.meta.url);
|
const __filename = fileURLToPath(import.meta.url);
|
||||||
@@ -154,7 +155,7 @@ const startApp = async () => {
|
|||||||
method: "shutdown",
|
method: "shutdown",
|
||||||
});
|
});
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}, 2000);
|
}, SHUTDOWN_TIMEOUT);
|
||||||
try {
|
try {
|
||||||
server.close();
|
server.close();
|
||||||
await jobQueue.obliterate();
|
await jobQueue.obliterate();
|
||||||
|
|||||||
Reference in new issue
Block a user