mirror of
https://github.com/Cleanuparr/Cleanuparr.git
synced 2026-06-10 06:45:35 -04:00
combine arr configs #1
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Common.Configuration;
|
||||
|
||||
namespace Data.Models.Configuration.QueueCleaner;
|
||||
|
||||
public sealed record QueueCleanerConfig : IJobConfig
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public Guid Id { get; init; } = Guid.NewGuid();
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user