taskforcesh / bullmq

BullMQ - Message Queue and Batch processing for NodeJS and Python based on Redis
https://bullmq.io
MIT License
5.47k stars 357 forks source link

Adding a repeatable job with an end data in the past should raise an exception #2568

Closed manast closed 15 hours ago

manast commented 2 weeks ago

As it is easy to mistakenly add a job that has an old endDate argument that will result in a repeatable job that never repeats, it would be useful to throw an exception to make it aware for the developer that this is the case.

fabianboerner commented 2 weeks ago

Yes, we had a problem because we calculated the repeatable end date. The service parameter where changed and the enddate was calculated in the past. The result was the return value from queue.add was empty and we could not identify the error first.

roggervalf commented 15 hours ago

https://github.com/taskforcesh/bullmq/pull/2574 it's covered by this pr