Added the ability to delete requests after they have become available

This commit is contained in:
tidusjar 2020-07-31 13:51:58 +01:00
commit c1529da0e6
14 changed files with 78 additions and 14 deletions

View file

@ -16,5 +16,6 @@
public string IssuesPurge { get; set; }
public string RetryRequests { get; set; }
public string MediaDatabaseRefresh { get; set; }
public string AutoDeleteRequests { get; set; }
}
}

View file

@ -76,6 +76,11 @@ namespace Ombi.Settings.Settings.Models
return ValidateCron(Get(s.MediaDatabaseRefresh, Cron.DayInterval(5)));
}
public static string AutoDeleteRequests(JobSettings s)
{
return ValidateCron(Get(s.AutoDeleteRequests, Cron.Daily()));
}
private static string Get(string settings, string defaultCron)
{
return settings.HasValue() ? settings : defaultCron;