feature/IO-3096-GlobalNotifications - Code Review Part 1
This commit is contained in:
@@ -146,7 +146,7 @@ const loadEmailQueue = async ({ pubClient, logger }) => {
|
||||
await pubClient.del(recipientsSet);
|
||||
await pubClient.del(`email:consolidate:${jobId}`);
|
||||
} catch (err) {
|
||||
logger.log(`Email Consolidation error for jobId ${jobId}`, "ERROR", "notifications", "api", {
|
||||
logger.log(`email-queue-consolidation-error`, "ERROR", "notifications", "api", {
|
||||
message: err?.message,
|
||||
stack: err?.stack
|
||||
});
|
||||
@@ -170,13 +170,13 @@ const loadEmailQueue = async ({ pubClient, logger }) => {
|
||||
emailAddWorker.on("completed", (job) => logger.logger.debug(`Email add job ${job.id} completed`));
|
||||
emailConsolidateWorker.on("completed", (job) => logger.logger.debug(`Email consolidate job ${job.id} completed`));
|
||||
emailAddWorker.on("failed", (job, err) =>
|
||||
logger.log(`Email add job ${job.id} failed`, "ERROR", "notifications", "api", {
|
||||
logger.log(`add-email-queue-failed`, "ERROR", "notifications", "api", {
|
||||
message: err?.message,
|
||||
stack: err?.stack
|
||||
})
|
||||
);
|
||||
emailConsolidateWorker.on("failed", (job, err) =>
|
||||
logger.log(`Email consolidate job ${job.id} failed:`, "ERROR", "notifications", "api", {
|
||||
logger.log(`email-consolidation-job-failed`, "ERROR", "notifications", "api", {
|
||||
message: err?.message,
|
||||
stack: err?.stack
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user