Closed sommmen closed 3 years ago
Hi, both would be a valid option, and you should do what seems most logical to you, its not like one is better or worse than the other.. its more what is logical in your case.
There is a call to .UseConsole()
https://github.com/AnderssonPeter/Hangfire.Console.Extensions/blob/dc6f7d5261f7117b790ec504a8df424e3f128cca/SampleWithSerilog/Startup.cs#L24
Hiya,
I personally use the following interface to build jobs on:
If i were to use this library, from what i can gather, i would need to change that interface and take out the
Performcontext context
and inject it in the constructor instead. Perhaps the same for the cancellationtoken.Or could i leave this as - is?
Also in this sample i don't see a call to
c.UseConsole(); in the startup, which adds the hangfire.console services. I also don't see this added in the
AddHangfireConsoleExtensions` method - do i not need to call hangfire.console anymore?This also uses
GlobalJobFilters.Filters.Add(new HangfireSubscriber());
`https://github.com/AnderssonPeter/Hangfire.Console.Extensions/blob/master/SampleWithSerilog/Startup.cs