Merge pull request #3502 from omnivore-app/fix/bullmq-job-retry-backoff

increase the seed valud of backoff delay to 2 seconds
This commit is contained in:
Hongbo Wu
2024-02-06 15:09:40 +08:00
committed by GitHub
3 changed files with 12 additions and 16 deletions

View File

@ -666,8 +666,6 @@ export const enqueueTriggerRuleJob = async (data: TriggerRuleJobData) => {
return queue.add(TRIGGER_RULE_JOB_NAME, data, {
priority: 5,
attempts: 1,
removeOnComplete: true,
removeOnFail: true,
})
}
@ -680,8 +678,6 @@ export const enqueueWebhookJob = async (data: CallWebhookJobData) => {
return queue.add(CALL_WEBHOOK_JOB_NAME, data, {
priority: 5,
attempts: 1,
removeOnComplete: true,
removeOnFail: true,
})
}
@ -698,10 +694,6 @@ export const bulkEnqueueUpdateLabels = async (data: UpdateLabelsData[]) => {
jobId: `${UPDATE_LABELS_JOB}_${d.libraryItemId}`,
attempts: 6,
priority: 1,
backoff: {
type: 'exponential',
delay: 1000,
},
},
}))
@ -724,10 +716,6 @@ export const enqueueUpdateHighlight = async (data: UpdateHighlightData) => {
jobId: `${UPDATE_HIGHLIGHT_JOB}_${data.libraryItemId}`,
attempts: 6,
priority: 1,
backoff: {
type: 'exponential',
delay: 1000,
},
})
} catch (error) {
logger.error('error enqueuing update highlight job', error)
@ -747,8 +735,6 @@ export const enqueueBulkAction = async (data: BulkActionData) => {
attempts: 1,
priority: 10,
jobId, // deduplication
removeOnComplete: true,
removeOnFail: true,
})
} catch (error) {
logger.error('error enqueuing bulk action job', error)