Set misfireThreshold to 2min and eased Cluster node checkin limit #23

Merged
khwezi merged 1 commits from emailjobs into master 2026-05-15 22:29:09 +02:00
2 changed files with 5 additions and 3 deletions
Showing only changes of commit dfc62c8fe1 - Show all commits
+4 -2
View File
@@ -34,7 +34,7 @@ public static class Quartz
storage.UseClustering(cluster =>
{
cluster.CheckinInterval = TimeSpan.FromSeconds(30);
cluster.CheckinMisfireThreshold = TimeSpan.FromSeconds(20);
cluster.CheckinMisfireThreshold = TimeSpan.FromSeconds(90);
});
});
});
@@ -62,6 +62,8 @@ public static class Quartz
config.UseDefaultThreadPool(options => options.MaxConcurrency = 1);
config.UseTimeZoneConverter();
config.SetProperty("quartz.jobStore.misfireThreshold", TimeSpan.FromMinutes(2).TotalMilliseconds.ToString());
config.UsePersistentStore(storage =>
{
storage.PerformSchemaValidation = false;
@@ -74,7 +76,7 @@ public static class Quartz
storage.UseClustering(cluster =>
{
cluster.CheckinInterval = TimeSpan.FromSeconds(30);
cluster.CheckinMisfireThreshold = TimeSpan.FromSeconds(20);
cluster.CheckinMisfireThreshold = TimeSpan.FromSeconds(90);
});
});
});
@@ -52,7 +52,7 @@ public class JobOrchestrator(ISchedulerFactory schedulerFactory) : IJobOrchestra
.WithIdentity(triggerKey)
.WithDescription($"Scheduled via Main Job at {now:g} UTC")
.WithCronSchedule(cronExpression, cron => cron
.WithMisfireHandlingInstructionFireAndProceed())
.WithMisfireHandlingInstructionIgnoreMisfires())
.StartAt(now)
.Build();