mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
add remove_on_complete and remove_on_fail to the unique job
This commit is contained in:
parent
59406ece7e
commit
ef6c6349de
2 changed files with 8 additions and 0 deletions
|
|
@ -138,5 +138,7 @@ export const queueRSSRefreshFeedJob = async (
|
|||
return queue.add('refresh-feed', payload, {
|
||||
jobId: jobid,
|
||||
priority: options.priority == 'low' ? 10 : 50,
|
||||
removeOnComplete: true,
|
||||
removeOnFail: true,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -694,6 +694,8 @@ export const bulkEnqueueUpdateLabels = async (data: UpdateLabelsData[]) => {
|
|||
jobId: `${UPDATE_LABELS_JOB}_${d.libraryItemId}`,
|
||||
attempts: 6,
|
||||
priority: 1,
|
||||
removeOnComplete: true,
|
||||
removeOnFail: true,
|
||||
},
|
||||
}))
|
||||
|
||||
|
|
@ -716,6 +718,8 @@ export const enqueueUpdateHighlight = async (data: UpdateHighlightData) => {
|
|||
jobId: `${UPDATE_HIGHLIGHT_JOB}_${data.libraryItemId}`,
|
||||
attempts: 6,
|
||||
priority: 1,
|
||||
removeOnComplete: true,
|
||||
removeOnFail: true,
|
||||
})
|
||||
} catch (error) {
|
||||
logger.error('error enqueuing update highlight job', error)
|
||||
|
|
@ -735,6 +739,8 @@ 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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue