feature/IO-2742-redis - Checkpoint - clear stage before moving to sub task
Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -110,6 +110,7 @@ const applySocketIO = async (server, app) => {
|
||||
}
|
||||
|
||||
process.on("SIGINT", async () => {
|
||||
logger.log("Closing Redis connections...", "INFO", "redis", "api");
|
||||
await Promise.all([pubClient.disconnect(), subClient.disconnect()]);
|
||||
process.exit(0);
|
||||
});
|
||||
|
||||
@@ -41,9 +41,11 @@ const tasksEmailQueueCleanup = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
// TODO: Consolidate into a group that can be run (multiple events with the same name)
|
||||
if (process.env.NODE_ENV !== "development") {
|
||||
// Handling SIGINT (e.g., Ctrl+C)
|
||||
process.on("SIGINT", async () => {
|
||||
logger.log("Clearing Tasks Email Queue...", "INFO", "redis", "api");
|
||||
await tasksEmailQueueCleanup();
|
||||
process.exit(0);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user