-
Notifications
You must be signed in to change notification settings - Fork 414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Promoting a recurring job does not schedule the next job #247
Comments
It should work, since a recurring job is waiting as a delayed job, can you provide a test where this does not hold? |
Finally got around to create a simple case.
I'm using a bull-board, but you can comment that out as that is not very important. |
Also noticed this issue. Promoting the job would run the process function, but the job would not be rescheduled afterwards. |
I have reproduced this issue and know exactly why it happens, but I need some time to fix it. |
Thanks! In the meantime I've just done this and it works for my purposes: if(/^repeat:/.test(job.id)) {
await queue.add(job.name, job.data);
} else {
await job.promote();
} But I do have a small question. When promoting a repeating job, say one that runs hourly with the next execution time being 10am, is the intended behavior to keep the scheduled time for the job as its next execution time (still 10am), or would it be to schedule it for the next hour afterwards (11am?). |
@Khauri it will be scheduled to the next run. |
I had the same issue. I promoted a repeating job with bull board. It disappeared from the delayed list and never came back. |
Yeah, it's related to this line https://github.com/taskforcesh/bullmq/blob/master/src/commands/promote-5.lua#L20, where job is deleted from delayed list |
@fgozdz I think this issue has been resolved some time ago, specially with the new job scheduler, could you please verify that it works now with a new test case so that we can close this issue? |
I'm not sure if this is the expected behavior.
If I were to promote a recurring job, it should run it and then ideally queue the next job.
The text was updated successfully, but these errors were encountered: