feature/IO-3096-GlobalNotifications - Code Review Part 1

This commit is contained in:
Dave Richer
2025-03-03 22:14:33 -05:00
parent b9df4c2587
commit a57abec81b
34 changed files with 124 additions and 77 deletions

View File

@@ -214,7 +214,7 @@ const loadAppQueue = async ({ pubClient, logger, redisHelpers, ioRedis }) => {
await pubClient.del(`app:consolidate:${jobId}`);
} catch (err) {
logger.log(`Consolidation error for jobId ${jobId}`, "ERROR", "notifications", "api", {
logger.log(`app-queue-consolidation-error`, "ERROR", "notifications", "api", {
message: err?.message,
stack: err?.stack
});
@@ -237,13 +237,13 @@ const loadAppQueue = async ({ pubClient, logger, redisHelpers, ioRedis }) => {
addWorker.on("completed", (job) => logger.logger.debug(`Add job ${job.id} completed`));
consolidateWorker.on("completed", (job) => logger.logger.debug(`Consolidate job ${job.id} completed`));
addWorker.on("failed", (job, err) =>
logger.log(`Add job ${job.id} failed:`, "ERROR", "notifications", "api", {
logger.log(`app-queue-notification-error`, "ERROR", "notifications", "api", {
message: err?.message,
stack: err?.stack
})
);
consolidateWorker.on("failed", (job, err) =>
logger.log(`Consolidate job ${job.id} failed:`, "ERROR", "notifications", "api", {
logger.log(`app-queue-consolidation-failed:`, "ERROR", "notifications", "api", {
message: err?.message,
stack: err?.stack
})