HangfireIO / HangfireIO/Hangfire

A way to pause/stop jobs from being processed

Open
#225 46 comments 33 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
10.1k
Forks
1.8k
Avg merge
1h 19m
Merged PRs (30d)
1

Description

Routinely we get in the situation where we want a specific server to temporarily stop processing jobs. We don't want to remove jobs from queuing up or being processed by other servers, just to take a specific server out of the equation.

Example: Sometimes I have a production server and a development server pointing to the same Hangfire database so we can troubleshoot issues. (I know, I know...) I would like to pause the production server (or maybe pause the dev server) from processing jobs and let the other server handle them. And i don't want to restart the servers in order to do that.

Another Example: Maybe we plan to take a server down for maintenance so we pause it from processing new jobs, wait for it to finish current jobs, and then take it down.

Is there way to programmatically stop the site from processing jobs?

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Begin by locating the server and job-processing lifecycle, then determine how a server can stop accepting new work while current jobs finish; done means programmatic pause and resume without removing queued jobs or restarting the server.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.