Question: Proper use of `endDate`
Created by: mattcollier
Description
I'm using a repeatable job that I would like to run ever 90 seconds for the next 30 minutes (duration). The job is running every 90 seconds as expected, but it continues to continue firing every 90 seconds after the endDate
await queue.add('monitorNodes', data, {repeat: {
jobId: uuid(),
every: 90000,
// end monitor 10 secs before the end of the stage
endDate: Date.now() + data.duration - 10000,
}});
Minimal, Working Test code to reproduce the issue.
(An easy to reproduce test case will dramatically decrease the resolution time.)
Usage is here: https://github.com/digitalbazaar/bedrock-ledger-test-orchestrator/blob/elector-pool/lib/node-api/job-process.js#L131-L136
Bull version
3.12.1
Additional information
Thank you!