Change Delemiters in BullMQ, was using an invalid :

This commit is contained in:
Dave
2025-10-10 15:58:32 -04:00
parent 11e0c3e507
commit 41afedd02c
2 changed files with 10 additions and 5 deletions

View File

@@ -288,7 +288,7 @@ const dispatchAppsToQueue = async ({ appsToDispatch }) => {
await appQueue.add( await appQueue.add(
"add-notification", "add-notification",
{ jobId, bodyShopId, key, variables, recipients, body, jobRoNumber }, { jobId, bodyShopId, key, variables, recipients, body, jobRoNumber },
{ jobId: `${jobId}:${Date.now()}` } { jobId: `${jobId}-${Date.now()}` }
); );
devDebugLogger(`Added notification to queue for jobId ${jobId} with ${recipients.length} recipients`); devDebugLogger(`Added notification to queue for jobId ${jobId} with ${recipients.length} recipients`);
} }

View File

@@ -249,10 +249,15 @@ const dispatchEmailsToQueue = async ({ emailsToDispatch, logger }) => {
continue; continue;
} }
await emailAddQueue.add( await emailConsolidateQueue.add(
"add-email-notification", "consolidate-emails",
{ jobId, jobRoNumber, bodyShopName, bodyShopTimezone, body, recipients }, { jobId, jobRoNumber, bodyShopName, bodyShopTimezone },
{ jobId: `${jobId}:${Date.now()}` } {
jobId: `consolidate-${jobId}`,
delay: EMAIL_CONSOLIDATION_DELAY,
attempts: 3,
backoff: LOCK_EXPIRATION
}
); );
devDebugLogger(`Added email notification to queue for jobId ${jobId} with ${recipients.length} recipients`); devDebugLogger(`Added email notification to queue for jobId ${jobId} with ${recipients.length} recipients`);
} }