HangfireIO / HangfireIO/Hangfire
RecurringJobManager does not use the provided queue name
- Dominant language
- C#
- Stars
- 10.1k
- Forks
- 1.8k
- Avg merge
- 1h 19m
- Merged PRs (30d)
- 1
Description
`RecurringJobManager.AddOrUpdate` does not use the `Job.Queue` from the `job` argument when creating the `RecurringJobEntity`. Instead, the [obsolete `RecurringJobOptions.QueueName` is used](https://github.com/HangfireIO/Hangfire/blob/v1.8.21/src/Hangfire.Core/RecurringJobManager.cs#L133).
I discovered this because [the obsolete extension methods](https://github.com/HangfireIO/Hangfire/blob/v1.8.21/src/Hangfire.Core/RecurringJobManagerExtensions.cs#L317) recommend using a `RecurringJobOptions` overload. However, if you do use one of those then you can only set the queue via the obsolete `RecurringJobOptions.QueueName` property. The `string queue` argument never makes it. You're stuck with an obsolete warning either way.
`Hangfire.Core` v1.8.21
Contributor guide
Research direction
Start in src/Hangfire.Core/RecurringJobManager.cs at the cited AddOrUpdate code, then compare the overloads in src/Hangfire.Core/RecurringJobManagerExtensions.cs. Trace how the provided Job.Queue and RecurringJobOptions.QueueName reach RecurringJobEntity; done means the provided queue is used without requiring the obsolete queue property.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 64/100