Compare commits

...

2 Commits

Author SHA1 Message Date
khwezi 61172c6139 Merge commit '0f91f102e576fc1f7a76cca21d3c02f3225baec1' 2026-05-15 07:52:03 +00:00
Khwezi Mngoma 0f91f102e5 Optimised quartz
continuous-integration/drone/pr Build is passing
2026-05-15 09:51:26 +02:00
+6 -4
View File
@@ -34,7 +34,7 @@ public static class Quartz
storage.UseClustering(cluster => storage.UseClustering(cluster =>
{ {
cluster.CheckinInterval = TimeSpan.FromSeconds(30); 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.ConfigureCommon();
services.AddQuartzHostedService(options => options.WaitForJobsToComplete = true);
services.AddQuartz(config => services.AddQuartz(config =>
{ {
config.SchedulerName = schedulerName; config.SchedulerName = schedulerName;
@@ -72,7 +74,7 @@ public static class Quartz
storage.UseClustering(cluster => storage.UseClustering(cluster =>
{ {
cluster.CheckinInterval = TimeSpan.FromSeconds(30); cluster.CheckinInterval = TimeSpan.FromSeconds(30);
cluster.CheckinMisfireThreshold = TimeSpan.FromSeconds(2); cluster.CheckinMisfireThreshold = TimeSpan.FromSeconds(20);
}); });
}); });
}); });
@@ -86,14 +88,14 @@ public static class Quartz
{ {
options.Scheduling.IgnoreDuplicates = true; options.Scheduling.IgnoreDuplicates = true;
options.Scheduling.OverWriteExistingData = true; options.Scheduling.OverWriteExistingData = true;
options["quartz.plugin.jobHistory.type"] = "Quartz.Plugin.History.LoggingJobHistoryPlugin, Quartz.Plugins"; options["quartz.plugin.jobHistory.type"] = "Quartz.Plugin.History.LoggingJobHistoryPlugin, Quartz.Plugins";
options["quartz.plugin.triggerHistory.type"] = "Quartz.Plugin.History.LoggingTriggerHistoryPlugin, Quartz.Plugins"; options["quartz.plugin.triggerHistory.type"] = "Quartz.Plugin.History.LoggingTriggerHistoryPlugin, Quartz.Plugins";
}); });
services.AddTransient<RetryJobListener>(); services.AddTransient<RetryJobListener>();
services.AddTransient<IJobOrchestrator, JobOrchestrator>(); services.AddTransient<IJobOrchestrator, JobOrchestrator>();
services.AddQuartzHostedService(options => options.WaitForJobsToComplete = true);
return services; return services;
} }
} }