From 23467280b4fa60431a90f9aa088f21d6c0add400 Mon Sep 17 00:00:00 2001 From: Dave Richer Date: Wed, 16 Oct 2024 13:18:48 -0400 Subject: [PATCH] release/2024-10-11: Remove Task Emails Cleanup Signed-off-by: Dave Richer --- server/email/tasksEmails.js | 48 ++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/server/email/tasksEmails.js b/server/email/tasksEmails.js index 94deb2be2..c8aebaa64 100644 --- a/server/email/tasksEmails.js +++ b/server/email/tasksEmails.js @@ -25,28 +25,32 @@ const tasksEmailQueueCleanup = async () => { } }; -if (process.env.NODE_ENV !== "development") { - // Handling SIGINT (e.g., Ctrl+C) - process.on("SIGINT", async () => { - await tasksEmailQueueCleanup(); - process.exit(0); - }); - // Handling SIGTERM (e.g., sent by system shutdown) - process.on("SIGTERM", async () => { - await tasksEmailQueueCleanup(); - process.exit(0); - }); - // Handling uncaught exceptions - process.on("uncaughtException", async (err) => { - await tasksEmailQueueCleanup(); - process.exit(1); - }); - // Handling unhandled promise rejections - process.on("unhandledRejection", async (reason, promise) => { - await tasksEmailQueueCleanup(); - process.exit(1); - }); -} +// if (process.env.NODE_ENV !== "development") { +// // Handling SIGINT (e.g., Ctrl+C) +// process.on("SIGINT", async () => { +// console.log("Handling SIGNIT For Tasks Cleanup"); +// await tasksEmailQueueCleanup(); +// process.exit(0); +// }); +// // Handling SIGTERM (e.g., sent by system shutdown) +// process.on("SIGTERM", async () => { +// console.log("Handling SIGTERM For Tasks Cleanup"); +// await tasksEmailQueueCleanup(); +// process.exit(0); +// }); +// // Handling uncaught exceptions +// process.on("uncaughtException", async (err) => { +// console.log("Handling uncaughtException For Tasks Cleanup"); +// await tasksEmailQueueCleanup(); +// process.exit(1); +// }); +// // Handling unhandled promise rejections +// process.on("unhandledRejection", async (reason, promise) => { +// console.log("Handling unhandledRejection For Tasks Cleanup"); +// await tasksEmailQueueCleanup(); +// process.exit(1); +// }); +// } /** * Format the date for the email.