feat(nextRunWorker): добавлен еще один backgroundWorker, который смотрит очередь, и пересчитывает nextRun для jobGroupId

This commit is contained in:
Mikhail Trubnikov
2026-02-27 14:05:25 +10:00
parent f7a2170454
commit 10bf68709b
16 changed files with 319 additions and 33 deletions

View File

@@ -0,0 +1,22 @@
using PARR.NextRun;
namespace PARR.NextRunWorker
{
public class IntervalWorker : BackgroundService
{
private readonly INextRunIntervalService nextRunIntervalService;
private readonly ILogger<IntervalWorker> logger;
public IntervalWorker(INextRunIntervalService nextRunIntervalService, ILogger<IntervalWorker> logger)
{
this.nextRunIntervalService = nextRunIntervalService;
this.logger = logger;
}
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
logger.LogInformation("Запуск {workerName}", nameof(IntervalWorker));
await nextRunIntervalService.StartAsync();
}
}
}