< Summary

Information
Class: Elsa.Workflows.Runtime.Distributed.DistributedBookmarkQueueWorker
Assembly: Elsa.Workflows.Runtime.Distributed
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime.Distributed/Services/DistributedBookmarkQueueWorker.cs
Line coverage
100%
Covered lines: 7
Uncovered lines: 0
Coverable lines: 7
Total lines: 25
Line coverage: 100%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
ProcessAsync()100%22100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime.Distributed/Services/DistributedBookmarkQueueWorker.cs

#LineLine coverage
 1using Medallion.Threading;
 2using Microsoft.Extensions.DependencyInjection;
 3using Microsoft.Extensions.Logging;
 4
 5namespace Elsa.Workflows.Runtime.Distributed;
 6
 7public class DistributedBookmarkQueueWorker(
 8    IDistributedLockProvider distributedLockProvider,
 9    IBookmarkQueueSignaler signaler,
 10    IServiceScopeFactory scopeFactory,
 911    ILogger<DistributedBookmarkQueueWorker> logger) : BookmarkQueueWorker(signaler, scopeFactory, logger)
 12{
 13    protected override async Task ProcessAsync(CancellationToken cancellationToken)
 14    {
 6215        await using var handle = await distributedLockProvider.TryAcquireLockAsync(nameof(DistributedBookmarkQueueWorker
 16
 6017        if (handle == null)
 18        {
 219            logger.LogInformation("Could not acquire lock for distributed bookmark queue worker. This is usually an indi
 220            return;
 21        }
 22
 5823        await base.ProcessAsync(cancellationToken);
 6024    }
 25}