|
|
@ -116,7 +116,7 @@ namespace Wood.Admin.WebApi |
|
|
|
); // 添加日志过滤器(可选)
|
|
|
|
services.AddHangfireServer(options => |
|
|
|
{ |
|
|
|
options.WorkerCount = 16; |
|
|
|
options.WorkerCount= Math.Max(Environment.ProcessorCount * 2, 10); |
|
|
|
// 可选:配置队列优先级
|
|
|
|
//options.Queues = builder.Configuration.GetSection("Hangfire:ServerOptions:Queues").Get<string[]>() ?? new[] { "default" };
|
|
|
|
|
|
|
|