Merged in release/2024-10-11 (pull request #1815)
release/2024-10-11: Remove Task Emails Cleanup
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user