What mechanism does Hangfire have to pause all servers (or 1, which itself will monitor that it is time for it to pause)?
For example: we have a service that is accessed by 5 hangfire servers (sending http requests), but suddenly the service fell for N minutes and there is no point in sending requests there for some time.
How to pause servers so that they wait, relatively speaking, 2 minutes, and then continue sending requests?
The only thing I found: IBackgroundProcessingServer.SendStop, but there is no Resume or Unpause.
In the same Quartz.NET there is scheduler.PauseAll() and scheduler.ResumeAll()
Found a solution for 1 server: through JobStorage and GetMonitoringApi() + DeletedJobs(0, int.MaxValue), and then add the deleted ones back, but the solution will not work for 2+ servers
What mechanism does Hangfire have to pause all servers (or 1, which itself will monitor that it is time for it to pause)?
For example: we have a service that is accessed by 5 hangfire servers (sending http requests), but suddenly the service fell for N minutes and there is no point in sending requests there for some time.
How to pause servers so that they wait, relatively speaking, 2 minutes, and then continue sending requests?
The only thing I found:
IBackgroundProcessingServer.SendStop
, but there is no Resume or Unpause.In the same Quartz.NET there is
scheduler.PauseAll()
andscheduler.ResumeAll()
Found a solution for 1 server: through
JobStorage
andGetMonitoringApi()
+DeletedJobs(0, int.MaxValue)
, and then add the deleted ones back, but the solution will not work for 2+ servers