Open StrangeWill opened 6 months ago
Given the following code:
BackgroundJobClient.Enqueue<JobDoer>("priority-analysis", dj=> dj.DoJob(null!, id, null));
Calling this:
[Queue("analysis")] public async Task DoJob(PerformContext? performContext, Guid testId, DateTime? _lastRun) {
Will cause the job to end up in the "analysis" queue.
If I remove [Queue("analysis")] it just uses the default queue.
[Queue("analysis")]
I'm using the default implementation of IBackgroundJobClient when injected via .NET 7.
IBackgroundJobClient
https://github.com/StrangeWill/HangfireQueueBug
Reproduction project ^
https://github.com/StrangeWill/HangfireQueueBug/blob/master/HostedServices/HangfireHostedService.cs
^ Relevant config.
^ Default queue
Given the following code:
Calling this:
Will cause the job to end up in the "analysis" queue.
If I remove
[Queue("analysis")]
it just uses the default queue.I'm using the default implementation of
IBackgroundJobClient
when injected via .NET 7.