Update shutdown logging

This commit is contained in:
Rory Powell 2022-08-31 10:47:41 +01:00
parent ea6de7c428
commit dd86875ea2
5 changed files with 9 additions and 7 deletions

View File

@ -26,7 +26,7 @@
"outputPath": "build"
},
"dependencies": {
"@budibase/backend-core": "1.1.32-alpha.6",
"@budibase/backend-core": "1.2.47",
"axios": "0.21.2",
"chalk": "4.1.0",
"cli-progress": "3.11.2",

View File

@ -74,9 +74,7 @@ server.on("close", async () => {
return
}
shuttingDown = true
if (!env.isTest()) {
console.log("Server Closed")
}
await automations.shutdown()
await redis.shutdown()
await events.shutdown()
@ -158,3 +156,7 @@ process.on("uncaughtException", err => {
process.on("SIGTERM", () => {
shutdown()
})
process.on("SIGINT", () => {
shutdown()
})

View File

@ -53,6 +53,7 @@ exports.shutdown = async () => {
await automationQueue.close()
automationQueue = null
}
console.log("Bull shutdown")
}
exports.queue = automationQueue

View File

@ -106,5 +106,6 @@ export class Thread {
static async shutdown() {
await Thread.stopThreads()
console.log("Threads shutdown")
}
}

View File

@ -63,9 +63,7 @@ server.on("close", async () => {
return
}
shuttingDown = true
if (!env.isTest()) {
console.log("Server Closed")
}
await redis.shutdown()
await events.shutdown()
if (!env.isTest()) {