有没有办法将hangfire配置为运行单线程?我希望按顺序处理作业,而不是同时处理。
就像是:
app.UseHangfire(config =>
{
config.RunSingleThreaded();
config.UseServer();
});
无论是这个还是将工作“链接”在一起的能力,以便它们按顺序发生。
就像是:
BackgroundJob
.Enqueue(() => taskContainer.PublishBatch(batchId, accountingPeriodId, currentUser, filePath))
.WithDependentJobId(23); // does not run until this job has finished...