mirror of
https://github.com/Cleanuparr/Cleanuparr.git
synced 2026-10-26 09:49:21 -04:00
Remove stalled downloads (#21)
This commit is contained in:
1 parent
0a6ec21c95
commit
64bb9fc513
53 files changed
+522
-160
No files matched your search
@@ -6,6 +6,7 @@ using Infrastructure.Verticals.ContentBlocker;
|
||||
using Infrastructure.Verticals.Jobs;
|
||||
using Infrastructure.Verticals.QueueCleaner;
|
||||
using Quartz;
|
||||
using Quartz.Spi;
|
||||
|
||||
namespace Executable.DependencyInjection;
|
||||
|
||||
@@ -94,7 +95,20 @@ public static class QuartzDI
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var triggerObj = (IOperableTrigger)TriggerBuilder.Create()
|
||||
.WithIdentity("ExampleTrigger")
|
||||
.StartNow()
|
||||
.WithCronSchedule(trigger)
|
||||
.Build();
|
||||
|
||||
var nextFireTimes = TriggerUtils.ComputeFireTimes(triggerObj, null, 2);
|
||||
|
||||
if (nextFireTimes[1] - nextFireTimes[0] > TimeSpan.FromHours(1))
|
||||
{
|
||||
throw new Exception($"{trigger} should have a fire time of maximum 1 hour");
|
||||
}
|
||||
|
||||
q.AddTrigger(opts =>
|
||||
{
|
||||
opts.ForJob(typeName)
|
||||
|
||||
Reference in new issue
Block a user