< Summary

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

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Options/RuntimeOptions.cs

#LineLine coverage
 1using Elsa.Workflows.Management.Entities;
 2
 3namespace Elsa.Workflows.Runtime.Options;
 4
 5/// <summary>
 6/// Provides options to the workflow runtime.
 7/// </summary>
 8public class RuntimeOptions
 9{
 10    /// <summary>
 11    /// A list of workflow builders configured during application startup.
 12    /// </summary>
 55613    public IDictionary<string, Func<IServiceProvider, ValueTask<IWorkflow>>> Workflows { get; set; } = new Dictionary<st
 14
 15    /// <summary>
 16    /// The default workflow liveness threshold.
 17    /// </summary>
 18    /// <remarks>
 19    /// The liveness threshold is used to determine if a persisted workflow instance in the <see cref="WorkflowSubStatus
 20    /// Interrupted workflows will be attempted to be restarted.
 21    /// A separate heartbeat process will ensure the <see cref="WorkflowInstance.UpdatedAt"/> is updated before this thr
 22    /// If the workflow instance got removed from memory, e.g. because of an application shutdown, the LastUpdated field
 23    /// </remarks>
 61324    public TimeSpan InactivityThreshold { get; set; } = TimeSpan.FromMinutes(5);
 25
 26    /// <summary>
 27    /// The number of workflow instances to restart in a single batch.
 28    /// </summary>
 29    /// <remarks>
 30    /// The batch size represents the number of workflow instance records to load into memory at a time.
 31    /// This provides control over memory consumption of the application.
 32    /// </remarks>
 13833    public int RestartInterruptedWorkflowsBatchSize { get; set; } = 100;
 34}