Wrap SQL Server EF Core workflow commits in a provider-safe transaction and buffer commit notifications until persistence succeeds. Also preserve dirty activity context state until commit success and make bookmark queue retries resilient to processed-row deletion and transient distributed lock misses. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
28 lines
826 B
C#
28 lines
826 B
C#
namespace Elsa.Workflows.Runtime.Options;
|
|
|
|
/// <summary>
|
|
/// Options for purging the bookmark queue.
|
|
/// </summary>
|
|
public class BookmarkQueuePurgeOptions
|
|
{
|
|
/// <summary>
|
|
/// The time-to-live for bookmark queue items.
|
|
/// </summary>
|
|
public TimeSpan Ttl { get; set; } = TimeSpan.FromMinutes(10);
|
|
|
|
/// <summary>
|
|
/// The number of records to clean up per sweep.
|
|
/// </summary>
|
|
public int BatchSize { get; set; } = 1000;
|
|
|
|
/// <summary>
|
|
/// The maximum number of failed delivery attempts before a queue item is moved to the dead-letter store.
|
|
/// </summary>
|
|
public int MaxDeliveryAttempts { get; set; } = 3;
|
|
|
|
/// <summary>
|
|
/// The time-to-live for bookmark queue dead-letter items.
|
|
/// </summary>
|
|
public TimeSpan DeadLetterTtl { get; set; } = TimeSpan.FromDays(7);
|
|
}
|