Fix CleanupService
Fixes that the lock handle wasn't actually used
This commit is contained in:
parent
369ebb6db3
commit
844ada9a67
|
|
@ -38,7 +38,10 @@ namespace Elsa.Retention.HostedServices
|
|||
{
|
||||
await Task.Delay(_interval, stoppingToken);
|
||||
await using var handle = await _distributedLockProvider.AcquireLockAsync(nameof(CleanupService), cancellationToken: stoppingToken);
|
||||
|
||||
|
||||
if (handle == null)
|
||||
continue;
|
||||
|
||||
try
|
||||
{
|
||||
await job.ExecuteAsync(stoppingToken);
|
||||
|
|
|
|||
Loading…
Reference in a new issue