Merge pull request 'Optimised quartz' (#22) from emailjobs into master

Reviewed-on: #22
This commit was merged in pull request #22.
This commit is contained in:
2026-05-15 09:52:06 +02:00
+5 -3
View File
@@ -34,7 +34,7 @@ public static class Quartz
storage.UseClustering(cluster =>
{
cluster.CheckinInterval = TimeSpan.FromSeconds(30);
cluster.CheckinMisfireThreshold = TimeSpan.FromSeconds(2);
cluster.CheckinMisfireThreshold = TimeSpan.FromSeconds(20);
});
});
});
@@ -48,6 +48,8 @@ public static class Quartz
services.ConfigureCommon();
services.AddQuartzHostedService(options => options.WaitForJobsToComplete = true);
services.AddQuartz(config =>
{
config.SchedulerName = schedulerName;
@@ -72,7 +74,7 @@ public static class Quartz
storage.UseClustering(cluster =>
{
cluster.CheckinInterval = TimeSpan.FromSeconds(30);
cluster.CheckinMisfireThreshold = TimeSpan.FromSeconds(2);
cluster.CheckinMisfireThreshold = TimeSpan.FromSeconds(20);
});
});
});
@@ -86,13 +88,13 @@ public static class Quartz
{
options.Scheduling.IgnoreDuplicates = true;
options.Scheduling.OverWriteExistingData = true;
options["quartz.plugin.jobHistory.type"] = "Quartz.Plugin.History.LoggingJobHistoryPlugin, Quartz.Plugins";
options["quartz.plugin.triggerHistory.type"] = "Quartz.Plugin.History.LoggingTriggerHistoryPlugin, Quartz.Plugins";
});
services.AddTransient<RetryJobListener>();
services.AddTransient<IJobOrchestrator, JobOrchestrator>();
services.AddQuartzHostedService(options => options.WaitForJobsToComplete = true);
return services;
}