1
0
Fork 0
mirror of synced 2024-06-22 16:10:40 +12:00

Update shutdown logging

This commit is contained in:
Rory Powell 2022-08-31 10:47:41 +01:00
parent 415678ee8a
commit ae3e4a7d6e
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")
}
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")
}
console.log("Server Closed")
await redis.shutdown()
await events.shutdown()
if (!env.isTest()) {