< Summary

Information
Class: Elsa.Workflows.Runtime.StartupTasks.RecoverInterruptedWorkflowsStartupTask
Assembly: Elsa.Workflows.Runtime
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/StartupTasks/RecoverInterruptedWorkflowsStartupTask.cs
Line coverage
100%
Covered lines: 3
Uncovered lines: 0
Coverable lines: 3
Total lines: 21
Line coverage: 100%
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%
ExecuteAsync()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/StartupTasks/RecoverInterruptedWorkflowsStartupTask.cs

#LineLine coverage
 1using Elsa.Common;
 2using Elsa.Common.RecurringTasks;
 3using JetBrains.Annotations;
 4
 5namespace Elsa.Workflows.Runtime.StartupTasks;
 6
 7/// <summary>
 8/// Startup task that scans for workflow instances in the <see cref="WorkflowSubStatus.Interrupted"/> sub-status
 9/// and requeues each one immediately, bypassing the timeout-based <c>RestartInterruptedWorkflowsTask</c> recurring
 10/// cadence. See FR-021 and research R4.
 11/// </summary>
 12[UsedImplicitly]
 13[SingleNodeTask]
 7914public sealed class RecoverInterruptedWorkflowsStartupTask(IInterruptedRecoveryScanner scanner) : IStartupTask
 15{
 16    /// <inheritdoc />
 17    public async Task ExecuteAsync(CancellationToken cancellationToken)
 18    {
 7919        await scanner.ScanAndRequeueAsync(cancellationToken);
 7920    }
 21}