From 1ea83aff1466cb24ba7bb6a07c4e148e6c2194b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marius=20Vasile=20Vu=C8=99can?= Date: Wed, 12 Mar 2025 13:58:38 +0200 Subject: [PATCH] Removed optional purge --- .../Features/WorkflowRuntimeFeature.cs | 9 --------- .../Options/BookmarkQueuePurgeOptions.cs | 5 ----- .../Services/DefaultBookmarkQueuePurger.cs | 6 ------ 3 files changed, 20 deletions(-) diff --git a/src/modules/Elsa.Workflows.Runtime/Features/WorkflowRuntimeFeature.cs b/src/modules/Elsa.Workflows.Runtime/Features/WorkflowRuntimeFeature.cs index 271c2172d..aa123fe9b 100644 --- a/src/modules/Elsa.Workflows.Runtime/Features/WorkflowRuntimeFeature.cs +++ b/src/modules/Elsa.Workflows.Runtime/Features/WorkflowRuntimeFeature.cs @@ -154,15 +154,6 @@ public class WorkflowRuntimeFeature(IModule module) : FeatureBase(module) Services.Configure(options => { options.IsEnabled = false; }); return this; } - - /// - /// Disables the purge bookmark queue recurring task. - /// - public WorkflowRuntimeFeature DisablePurgeBookmarkQueueRecurringTask() - { - Services.Configure(options => { options.IsEnabled = false; }); - return this; - } /// /// Register the specified workflow type. diff --git a/src/modules/Elsa.Workflows.Runtime/Options/BookmarkQueuePurgeOptions.cs b/src/modules/Elsa.Workflows.Runtime/Options/BookmarkQueuePurgeOptions.cs index 361955f75..b217082f5 100644 --- a/src/modules/Elsa.Workflows.Runtime/Options/BookmarkQueuePurgeOptions.cs +++ b/src/modules/Elsa.Workflows.Runtime/Options/BookmarkQueuePurgeOptions.cs @@ -14,9 +14,4 @@ public class BookmarkQueuePurgeOptions /// The number of records to clean up per sweep. /// public int BatchSize { get; set; } = 1000; - - /// - /// Whether the bookmark queue purge is enabled. - /// - public bool IsEnabled { get; set; } = true; } \ No newline at end of file diff --git a/src/modules/Elsa.Workflows.Runtime/Services/DefaultBookmarkQueuePurger.cs b/src/modules/Elsa.Workflows.Runtime/Services/DefaultBookmarkQueuePurger.cs index 19120df14..9216ca9cd 100644 --- a/src/modules/Elsa.Workflows.Runtime/Services/DefaultBookmarkQueuePurger.cs +++ b/src/modules/Elsa.Workflows.Runtime/Services/DefaultBookmarkQueuePurger.cs @@ -15,12 +15,6 @@ public class DefaultBookmarkQueuePurger(IBookmarkQueueStore store, ISystemClock { public async Task PurgeAsync(CancellationToken cancellationToken = default) { - if (!options.Value.IsEnabled) - { - logger.LogInformation("Purging bookmark queue is disabled"); - return; - } - var currentPage = 0; var now = systemClock.UtcNow; var thresholdDate = now - options.Value.Ttl;