Files
Cleanuparr/code/Common/Configuration/QueueCleaner/QueueCleanerConfig.cs
2025-06-09 12:50:26 +03:00

29 lines
850 B
C#

namespace Common.Configuration.QueueCleaner;
public sealed record QueueCleanerConfig : IJobConfig
{
public bool Enabled { get; init; }
public string CronExpression { get; init; } = "0 0/5 * * * ?";
/// <summary>
/// Indicates whether to use the CronExpression directly or convert from a user-friendly schedule
/// </summary>
public bool UseAdvancedScheduling { get; init; } = false;
public FailedImportConfig FailedImport { get; init; } = new();
public StalledConfig Stalled { get; init; } = new();
public SlowConfig Slow { get; init; } = new();
public ContentBlockerConfig ContentBlocker { get; init; } = new();
public void Validate()
{
FailedImport.Validate();
Stalled.Validate();
Slow.Validate();
ContentBlocker.Validate();
}
}