Question: About stalled jobs and attempts parameter to repeatable jobs #2018
Unanswered
right-handed
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
That is cool to have stalled jobs concept working!
But for my purposes, I don't need it. I have some IO intense repeatable jobs, estimated completion time is about 10 min. I care only about logs, all information needed is logged during the job is running. So even if the job will crash the node process, I don't want it to start again till completed after the server will be up again.
The real question is how to achieve such flow.
My idea is to create a repeatable job with next options:
{ repeat: { cron: "*/10 * * * *" }, attempts: 1, removeOnComplete: true, removeOnFail: true }
Queue settings:
stalledInterval: 60000; lockRenewTime: 3600000
Am I get it right, if the node will be down during the job is active, the job will be stalled?
And here is a handler for stalled jobs
queue.on( 'stalled', (job) => { job.discard() } )
Sorry for the lack of info and really appreciate the response!
Beta Was this translation helpful? Give feedback.
All reactions