mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #3495 from omnivore-app/feat/save-page-retries
feat/save page retries
This commit is contained in:
commit
7b8d5aafa5
2 changed files with 13 additions and 2 deletions
|
|
@ -38,7 +38,7 @@ const getAttempts = (job: savePageJob): number => {
|
|||
return 1
|
||||
}
|
||||
|
||||
return 2
|
||||
return 3
|
||||
}
|
||||
|
||||
const getOpts = (job: savePageJob): BulkJobOptions => {
|
||||
|
|
@ -48,6 +48,10 @@ const getOpts = (job: savePageJob): BulkJobOptions => {
|
|||
// removeOnFail: true,
|
||||
attempts: getAttempts(job),
|
||||
priority: getPriority(job),
|
||||
backoff: {
|
||||
type: 'exponential',
|
||||
delay: 2000,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,5 +17,12 @@ type UpdatePageJobData = {
|
|||
}
|
||||
|
||||
export const queueUpdatePageJob = async (data: UpdatePageJobData) => {
|
||||
return queue.add(JOB_NAME, data)
|
||||
return queue.add(JOB_NAME, data, {
|
||||
priority: 5,
|
||||
attempts: 3,
|
||||
backoff: {
|
||||
type: 'exponential',
|
||||
delay: 1000,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue