Fix empty torrents (#11)

* fixed unwanted deletion of torrents in downloading metadata state

* refactored jobs code

* updated arr test data

* updated gitignore

* updated test configuration and removed dispensable files
This commit is contained in:
Marius Nechifor
2024-11-24 01:01:20 +02:00
committed by GitHub
parent 54cabd98b4
commit 3e0913b437
44 changed files with 208 additions and 1401 deletions

View File

@@ -51,15 +51,15 @@ public static class QuartzDI
return;
}
q.AddJob<QueueCleanerJob>(opts =>
q.AddJob<GenericJob<QueueCleaner>>(opts =>
{
opts.WithIdentity(nameof(QueueCleanerJob));
opts.WithIdentity(nameof(QueueCleaner));
});
q.AddTrigger(opts =>
{
opts.ForJob(nameof(QueueCleanerJob))
.WithIdentity($"{nameof(QueueCleanerJob)}-trigger")
opts.ForJob(nameof(QueueCleaner))
.WithIdentity($"{nameof(QueueCleaner)}-trigger")
.WithCronSchedule(trigger, x =>x.WithMisfireHandlingInstructionDoNothing());
});
}
@@ -84,15 +84,15 @@ public static class QuartzDI
return;
}
q.AddJob<ContentBlockerJob>(opts =>
q.AddJob<GenericJob<ContentBlocker>>(opts =>
{
opts.WithIdentity(nameof(ContentBlockerJob));
opts.WithIdentity(nameof(ContentBlocker));
});
q.AddTrigger(opts =>
{
opts.ForJob(nameof(ContentBlockerJob))
.WithIdentity($"{nameof(ContentBlockerJob)}-trigger")
opts.ForJob(nameof(ContentBlocker))
.WithIdentity($"{nameof(ContentBlocker)}-trigger")
.WithCronSchedule(trigger, x =>x.WithMisfireHandlingInstructionDoNothing());
});
}

View File

@@ -15,8 +15,6 @@ public static class ServicesDI
services
.AddTransient<SonarrClient>()
.AddTransient<RadarrClient>()
.AddTransient<QueueCleanerJob>()
.AddTransient<ContentBlockerJob>()
.AddTransient<QueueCleaner>()
.AddTransient<ContentBlocker>()
.AddTransient<FilenameEvaluator>()