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
Hi. I'm trying to implement a "graceful stop" sequence for a worker process which happens when e.g. a machine is stopping. The idea is to call queue.pause(true), then wait for some reasonable amount of time (say, 10 seconds) letting most of the short-lived jobs to finish on their own. Then, there will always be some remaining jobs (long-lived) for which 10 seconds is not enough; for them, we can do nothing, so I just terminate the process.
The problem is with locks of these remaining jobs. Theoretically, I know for 100% that these jobs will stop running within a second (since the process dies), so I want the locks to be released immediately; this way, the jobs' keys can be rescheduled ASAP and not when the locks expire (due to various reasons, the locks timeouts are set to some high value, like 60 seconds, to eliminate the chances of expiring them during some temporary problems with CPU load or network).
Is there a way to tell Bull to force-release locks for all the jobs which are still running in the current (!) process?
The text was updated successfully, but these errors were encountered:
@manast I came here to ask a similar question; I have a setup where the state of my tasks is being managed by a separate application from my workers (listening to the event stream) and I have several of my worker application running in parallel - if one of my workers is stopped or crashes during the execution of a job does it automatically get reqeueued? I'm running Bull 3.20.1
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi. I'm trying to implement a "graceful stop" sequence for a worker process which happens when e.g. a machine is stopping. The idea is to call
queue.pause(true)
, then wait for some reasonable amount of time (say, 10 seconds) letting most of the short-lived jobs to finish on their own. Then, there will always be some remaining jobs (long-lived) for which 10 seconds is not enough; for them, we can do nothing, so I just terminate the process.The problem is with locks of these remaining jobs. Theoretically, I know for 100% that these jobs will stop running within a second (since the process dies), so I want the locks to be released immediately; this way, the jobs' keys can be rescheduled ASAP and not when the locks expire (due to various reasons, the locks timeouts are set to some high value, like 60 seconds, to eliminate the chances of expiring them during some temporary problems with CPU load or network).
Is there a way to tell Bull to force-release locks for all the jobs which are still running in the current (!) process?
The text was updated successfully, but these errors were encountered: