Files
Cleanuparr/code/Common/Configuration/QueueCleaner/FailedImportConfig.cs
2025-06-07 02:05:51 +03:00

22 lines
541 B
C#

using Common.Exceptions;
namespace Common.Configuration.QueueCleaner;
public sealed record FailedImportConfig
{
public ushort MaxStrikes { get; init; }
public bool IgnorePrivate { get; init; }
public bool DeletePrivate { get; init; }
public IReadOnlyList<string> IgnoredPatterns { get; init; } = [];
public void Validate()
{
if (MaxStrikes is > 0 and < 3)
{
throw new ValidationException("the minimum value for failed imports max strikes must be 3");
}
}
}