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.