feat: enhance price update job handling with deduplication and retry logic
Build Images and Deploy / Update-PROD-Stack (push) Successful in 1m20s

This commit is contained in:
2026-03-18 20:59:34 -04:00
parent 8e808d5e7c
commit 7bd99e8fcb
+7 -1
View File
@@ -218,7 +218,13 @@ const schedulerWorker = new Worker(
await priceUpdateQueue.add(
'update-price',
{ hashtagId: hashtag.id, tag: hashtag.tag },
{ jobId: `price-${hashtag.id}` }, // deduplicate by jobId
{
jobId: `price-${hashtag.id}`, // deduplicates against waiting/active (hash persists)
removeOnComplete: true, // remove hash on completion so jobId can be reused next sweep
removeOnFail: { count: 50 },
attempts: 3,
backoff: { type: 'exponential', delay: 5000 },
},
)
}