mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
refactor(archival): ♻⚡ limit num of workers for executing jobs
This commit is contained in:
parent
ee2b2851f0
commit
71f4b8a840
1 changed files with 3 additions and 2 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using Hangfire;
|
||||
using System;
|
||||
using Hangfire;
|
||||
using MediatR;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
|
@ -23,7 +24,7 @@ public static void AddSchedulingServices(this IServiceCollection services, IConf
|
|||
|
||||
public static void UseScheduling(this IApplicationBuilder app)
|
||||
{
|
||||
app.UseHangfireServer();
|
||||
app.UseHangfireServer(new BackgroundJobServerOptions {WorkerCount = Environment.ProcessorCount * 1});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue