Removed optional purge
This commit is contained in:
parent
c2161d057a
commit
1ea83aff14
|
|
@ -154,15 +154,6 @@ public class WorkflowRuntimeFeature(IModule module) : FeatureBase(module)
|
|||
Services.Configure<WorkflowInboxCleanupOptions>(options => { options.IsEnabled = false; });
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Disables the purge bookmark queue recurring task.
|
||||
/// </summary>
|
||||
public WorkflowRuntimeFeature DisablePurgeBookmarkQueueRecurringTask()
|
||||
{
|
||||
Services.Configure<BookmarkQueuePurgeOptions>(options => { options.IsEnabled = false; });
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Register the specified workflow type.
|
||||
|
|
|
|||
|
|
@ -14,9 +14,4 @@ public class BookmarkQueuePurgeOptions
|
|||
/// The number of records to clean up per sweep.
|
||||
/// </summary>
|
||||
public int BatchSize { get; set; } = 1000;
|
||||
|
||||
/// <summary>
|
||||
/// Whether the bookmark queue purge is enabled.
|
||||
/// </summary>
|
||||
public bool IsEnabled { get; set; } = true;
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue