Make percentage-getting easier

This commit is contained in:
Conor 2022-06-21 18:33:33 +01:00
parent 755afdda01
commit abcb7a5314
Signed by: CADawg
GPG Key ID: A28C6F51829932B9
1 changed files with 3 additions and 3 deletions

View File

@ -90,14 +90,14 @@ process.on("exit", (code) => {
});
// just in case some user like using "kill"
process.on("SIGTERM", (signal) => {
process.on("SIGTERM", () => {
console.log("Saving DB");
saveAndCleanup();
process.exit(0);
});
// catch ctrl-c, so that event 'exit' always works
process.on("SIGINT", (signal) => {
process.on("SIGINT", () => {
console.log("Saving DB");
saveAndCleanup();
process.exit(0);
@ -105,7 +105,7 @@ process.on("SIGINT", (signal) => {
// what about errors
// try remove/comment this handler, 'exit' event still works
process.on("uncaughtException", (err) => {
process.on("uncaughtException", () => {
console.log("Saving DB");
saveAndCleanup();
process.exit(1);