mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
fix(archival): 🐛 replace obsolete UseHangfireServer() extension
This commit is contained in:
parent
d214e4982b
commit
0f136a8599
2 changed files with 1 additions and 7 deletions
|
|
@ -29,6 +29,5 @@ public static void AddInfrastructureServices(this IServiceCollection services, I
|
|||
public static void UseInfrastructure(this IApplicationBuilder app)
|
||||
{
|
||||
app.UseLogging();
|
||||
app.UseScheduling();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
using Hangfire;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using StackExchange.Redis;
|
||||
|
|
@ -14,10 +13,6 @@ public static void AddSchedulingServices(this IServiceCollection services, IConf
|
|||
{
|
||||
_redis = ConnectionMultiplexer.Connect(configuration.GetConnectionString("SchedulingConnection"));
|
||||
services.AddHangfire((_, globalConfiguration) => globalConfiguration.UseRedisStorage(_redis).UseMediatR());
|
||||
}
|
||||
|
||||
public static void UseScheduling(this IApplicationBuilder app)
|
||||
{
|
||||
app.UseHangfireServer(new BackgroundJobServerOptions { WorkerCount = Environment.ProcessorCount });
|
||||
services.AddHangfireServer(o => o.WorkerCount = Environment.ProcessorCount);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue