Add retries for pdf handler job

This commit is contained in:
Jackson Harper
2024-02-03 15:36:40 +08:00
parent 9e6b5d2dcf
commit f0103d4da5

View File

@ -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,
},
})
}