HangfireIO / HangfireIO/Hangfire
default queue jobs stuck forever if not register in the Queues list
- Dominant language
- C#
- Stars
- 10.1k
- Forks
- 1.8k
- Avg merge
- 1h 19m
- Merged PRs (30d)
- 1
Description
Hi
I just want to highlight a weird issue i had for days which all jobs stuck in the default queue, All the solutions mentioned in github or stackoverflow useless, after digged in the sql profiler found the query for jobs list all the queues that register in my code but the "default" queue is missing. default queue is created automaticly when the server start. i still wondering if this automatically created why not just add it to the list of queues if not found?
Also i released that the documentation show the default in the list of queus but no note we must add it to our list.
I'd appreciate if you update the code or the doc to save someone else time.
var options = new BackgroundJobServerOptions
{
// we must add the "default" otherwise the all the jobs end up stuck forever
Queues = new[] { "alpha", "beta", "default" }
};
Contributor guide
Research direction
Start with BackgroundJobServerOptions and its Queues setting, reproducing the reported behavior with only alpha and beta registered while jobs use the default queue. Trace how the default queue is created and how registered queues are queried; done means either the default queue is processed without extra configuration or the documentation clearly warns that it must be listed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100