refactor(archival): ♻ limit num of workers for executing jobs

This commit is contained in:
Collin M. Barrett 2020-09-13 20:44:28 -05:00
parent ee2b2851f0
commit 71f4b8a840

View file

@ -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});
}
}
}