< Summary

Information
Class: Elsa.Workflows.Runtime.Handlers.SignalBookmarkQueueWorker
Assembly: Elsa.Workflows.Runtime
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Handlers/SignalBookmarkQueueWorker.cs
Line coverage
83%
Covered lines: 5
Uncovered lines: 1
Coverable lines: 6
Total lines: 33
Line coverage: 83.3%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
HandleAsync(...)100%210%
HandleAsync(...)100%11100%
HandleAsync(...)100%11100%
Trigger()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Handlers/SignalBookmarkQueueWorker.cs

#LineLine coverage
 1using Elsa.Mediator.Contracts;
 2using Elsa.Workflows.Management.Notifications;
 3using Elsa.Workflows.Runtime.Notifications;
 4using JetBrains.Annotations;
 5
 6namespace Elsa.Workflows.Runtime.Handlers;
 7
 8/// <summary>
 9/// Signals the bookmark queue worker to process any queued work.
 10/// </summary>
 11[UsedImplicitly]
 46712public class SignalBookmarkQueueWorker(IBookmarkQueueSignaler signaler) : INotificationHandler<WorkflowBookmarksIndexed>
 13{
 14    public Task HandleAsync(BookmarkSaved notification, CancellationToken cancellationToken)
 15    {
 016        return Trigger();
 17    }
 18
 19    public Task HandleAsync(WorkflowBookmarksIndexed notification, CancellationToken cancellationToken)
 20    {
 46621        return Trigger();
 22    }
 23
 24    public Task HandleAsync(WorkflowInstanceSaved notification, CancellationToken cancellationToken)
 25    {
 49626        return Trigger();
 27    }
 28
 29    private async Task Trigger()
 30    {
 96231        await signaler.TriggerAsync();
 96232    }
 33}