Update shutdown logging
This commit is contained in:
parent
ea6de7c428
commit
dd86875ea2
|
@ -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",
|
||||
|
|
|
@ -74,9 +74,7 @@ server.on("close", async () => {
|
|||
return
|
||||
}
|
||||
shuttingDown = true
|
||||
if (!env.isTest()) {
|
||||
console.log("Server Closed")
|
||||
}
|
||||
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()
|
||||
})
|
||||
|
|
|
@ -53,6 +53,7 @@ exports.shutdown = async () => {
|
|||
await automationQueue.close()
|
||||
automationQueue = null
|
||||
}
|
||||
console.log("Bull shutdown")
|
||||
}
|
||||
|
||||
exports.queue = automationQueue
|
||||
|
|
|
@ -106,5 +106,6 @@ export class Thread {
|
|||
|
||||
static async shutdown() {
|
||||
await Thread.stopThreads()
|
||||
console.log("Threads shutdown")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,9 +63,7 @@ server.on("close", async () => {
|
|||
return
|
||||
}
|
||||
shuttingDown = true
|
||||
if (!env.isTest()) {
|
||||
console.log("Server Closed")
|
||||
}
|
||||
console.log("Server Closed")
|
||||
await redis.shutdown()
|
||||
await events.shutdown()
|
||||
if (!env.isTest()) {
|
||||
|
|
Loading…
Reference in New Issue