< Summary

Information
Class: Elsa.Workflows.Runtime.Tasks.ProcessWorkflowDispatchOutboxRecurringTask
Assembly: Elsa.Workflows.Runtime
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Tasks/ProcessWorkflowDispatchOutboxRecurringTask.cs
Line coverage
66%
Covered lines: 4
Uncovered lines: 2
Coverable lines: 6
Total lines: 26
Line coverage: 66.6%
Branch coverage
50%
Covered branches: 1
Total branches: 2
Branch coverage: 50%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
ExecuteAsync()50%2260%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Tasks/ProcessWorkflowDispatchOutboxRecurringTask.cs

#LineLine coverage
 1using Elsa.Common;
 2using Elsa.Common.RecurringTasks;
 3using Elsa.Workflows.Runtime.Options;
 4using JetBrains.Annotations;
 5using Microsoft.Extensions.DependencyInjection;
 6using Microsoft.Extensions.Options;
 7
 8namespace Elsa.Workflows.Runtime.Tasks;
 9
 10/// <summary>
 11/// Periodically processes pending workflow dispatch outbox items.
 12/// </summary>
 13[SingleNodeTask]
 14[UsedImplicitly]
 7915public class ProcessWorkflowDispatchOutboxRecurringTask(IServiceProvider serviceProvider, IOptions<WorkflowDispatcherOpt
 16{
 17    /// <inheritdoc />
 18    public override async Task ExecuteAsync(CancellationToken cancellationToken = default)
 19    {
 12220        if (!options.Value.UseTransactionalOutbox)
 12221            return;
 22
 023        var processor = serviceProvider.GetRequiredService<IWorkflowDispatchOutboxProcessor>();
 024        await processor.ProcessAsync(cancellationToken);
 12225    }
 26}