You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to advance the delay of the job while the job is in the delayed state? As far as I can see it involves resetting the delay and change the zscore of the job. Anything else needs to be done?
At the moment in such case I keep track of the the delay using a custom variable and promote the job instead. In the job I compare the current time with the custom and decide wither to proceed with the job or retry with the new delay. Although working, it seems a bit awkward. Is there a builtin way of doing that?
The text was updated successfully, but these errors were encountered:
There is no built in way to do it, but as you mentioned is quite straightforward to implement. It could be a lua script that just updates the delay and zscore and sends an event to the delay stream (so that BullMQ knows when to pick it up), and some small bookkeeping to check that the job actually is delayed (to eliminate a possible race condition where the job has already started processing when we try to change the delay time). You can find how delay jobs are added in addJob-8.lua. .
Is it possible to advance the delay of the job while the job is in the delayed state? As far as I can see it involves resetting the delay and change the zscore of the job. Anything else needs to be done?
At the moment in such case I keep track of the the delay using a custom variable and promote the job instead. In the job I compare the current time with the custom and decide wither to proceed with the job or retry with the new delay. Although working, it seems a bit awkward. Is there a builtin way of doing that?
The text was updated successfully, but these errors were encountered: