HangfireIO / HangfireIO/Hangfire

Running jobs in a serial queue?

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

Description

Is there any way I can ensure jobs are run serially as opposed to in parallel (even better - have a serial queue)? E.g. I'd like to ensure only one job of type X can be running at any given time.

I've reduced my number of workers down to 1, not sure if that'll do the trick for now? Does the worker count always get used even if I use BackgroundJob.Enqueue?

Contributor guide

Open the contributing guide

Research direction

The request concerns worker counts, BackgroundJob.Enqueue, and serial execution of jobs of one type, but it names no implementation file or test. Start by clarifying whether the goal is a single-worker queue or per-job-type serialization, then inspect the existing worker and queue behavior. Done should include a defined serialization rule and tests proving that only one matching job runs at a time.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.