HangfireIO / HangfireIO/Hangfire
How to pause all servers?
- Dominant language
- C#
- Stars
- 10.1k
- Forks
- 1.8k
- Avg merge
- 1h 19m
- Merged PRs (30d)
- 1
Description
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
Contributor guide
Research direction
Start by reading IBackgroundProcessingServer.SendStop and the JobStorage.GetMonitoringApi()/DeletedJobs path described in the report, then compare the requested multi-server behavior with Quartz.NET's PauseAll and ResumeAll. A complete resolution would define a supported pause/resume mechanism coordinating all Hangfire servers, but the issue does not identify an implementation file or test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100