This commit is contained in:
Dave
2025-10-10 16:02:56 -04:00
parent 41afedd02c
commit 8e6c809fc6
2 changed files with 6 additions and 11 deletions

View File

@@ -92,7 +92,7 @@ const loadAppQueue = async ({ pubClient, logger, redisHelpers, ioRedis }) => {
"consolidate-notifications",
{ jobId, recipients },
{
jobId: `consolidate:${jobId}`,
jobId: `consolidate-${jobId}`,
delay: APP_CONSOLIDATION_DELAY,
attempts: 3,
backoff: LOCK_EXPIRATION

View File

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