Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,11 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)

while (!stoppingToken.IsCancellationRequested)
{
var delay = Task.Delay(1000, stoppingToken);

await locker.LockAsync(DIST_KEY, async () =>
{
await RunCronChecker(scope.ServiceProvider);
await Task.Delay(1000, stoppingToken);
});

await delay;
}

_logger.LogWarning("Crontab Watcher background service is stopped.");
Expand Down
Loading