-
What is the correct way to retry jobs which fail? We have a configured job queue with retry options: export const RETRY_CONFIG = {
retryLimit: 10,
retryDelay: 10,
retryBackoff: true,
}; await boss.send(CoreQueue.WEBFLOW_CHECKOUT, webflowJobData, RETRY_CONFIG); However if this job throws an error, it just moves to a completed state as is not retried. What should we be doing to have this job run again? boss.work(CoreQueue.WEBFLOW_CHECKOUT, options, (job: any) => {
webflowCheckout(job)
.then(() => job.done())
.catch(error => job.done(error));
}); |
Beta Was this translation helpful? Give feedback.
Answered by
timgit
Mar 7, 2023
Replies: 1 comment
-
Try using an async job handler to simplify job completion handling. You shouldn't normally need to explicitly call job.done(), as this was an older api used before async/await were added. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
mal-drop
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try using an async job handler to simplify job completion handling. You shouldn't normally need to explicitly call job.done(), as this was an older api used before async/await were added.