Update shutdown logging
This commit is contained in:
parent
415678ee8a
commit
ae3e4a7d6e
|
@ -26,7 +26,7 @@
|
||||||
"outputPath": "build"
|
"outputPath": "build"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/backend-core": "1.1.32-alpha.6",
|
"@budibase/backend-core": "1.2.47",
|
||||||
"axios": "0.21.2",
|
"axios": "0.21.2",
|
||||||
"chalk": "4.1.0",
|
"chalk": "4.1.0",
|
||||||
"cli-progress": "3.11.2",
|
"cli-progress": "3.11.2",
|
||||||
|
|
|
@ -74,9 +74,7 @@ server.on("close", async () => {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
shuttingDown = true
|
shuttingDown = true
|
||||||
if (!env.isTest()) {
|
console.log("Server Closed")
|
||||||
console.log("Server Closed")
|
|
||||||
}
|
|
||||||
await automations.shutdown()
|
await automations.shutdown()
|
||||||
await redis.shutdown()
|
await redis.shutdown()
|
||||||
await events.shutdown()
|
await events.shutdown()
|
||||||
|
@ -158,3 +156,7 @@ process.on("uncaughtException", err => {
|
||||||
process.on("SIGTERM", () => {
|
process.on("SIGTERM", () => {
|
||||||
shutdown()
|
shutdown()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
process.on("SIGINT", () => {
|
||||||
|
shutdown()
|
||||||
|
})
|
||||||
|
|
|
@ -53,6 +53,7 @@ exports.shutdown = async () => {
|
||||||
await automationQueue.close()
|
await automationQueue.close()
|
||||||
automationQueue = null
|
automationQueue = null
|
||||||
}
|
}
|
||||||
|
console.log("Bull shutdown")
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.queue = automationQueue
|
exports.queue = automationQueue
|
||||||
|
|
|
@ -106,5 +106,6 @@ export class Thread {
|
||||||
|
|
||||||
static async shutdown() {
|
static async shutdown() {
|
||||||
await Thread.stopThreads()
|
await Thread.stopThreads()
|
||||||
|
console.log("Threads shutdown")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,9 +63,7 @@ server.on("close", async () => {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
shuttingDown = true
|
shuttingDown = true
|
||||||
if (!env.isTest()) {
|
console.log("Server Closed")
|
||||||
console.log("Server Closed")
|
|
||||||
}
|
|
||||||
await redis.shutdown()
|
await redis.shutdown()
|
||||||
await events.shutdown()
|
await events.shutdown()
|
||||||
if (!env.isTest()) {
|
if (!env.isTest()) {
|
||||||
|
|
Loading…
Reference in New Issue