HangfireIO / Hangfire

An easy way to perform background job processing in .NET and .NET Core applications. No Windows Service or separate process required
https://www.hangfire.io
Other
9.43k stars 1.7k forks source link

Dynamic Recurring Job (AddOrUpdateDynamic) with specified Queue Name #2450

Open mthrift2100 opened 1 month ago

mthrift2100 commented 1 month ago

I have not been able to get the specified queue to persist when adding a Dynamic Recurring Job. Below is the code I am using:

 public async Task AddOrUpdateRecurringJob<T>(string jobName, Expression<Func<T, Task>> methodCall, string cronExpression, TimeZoneInfo timeZoneInfo, string queue)
 {
     _reccuringJobManager.AddOrUpdateDynamic<T>(jobName,
                                                queue,
                                                methodCall,
                                                cronExpression, 
                                                new DynamicRecurringJobOptions() { MisfireHandling = MisfireHandlingMode.Relaxed, TimeZone = TimeZoneInfo.Local });

     await Task.CompletedTask;
 }

No matter what queue name I supply, it always gets stored as 'default'