From dfc62c8fe1a3e9eb13543ffe5f502e7b18e2b91f Mon Sep 17 00:00:00 2001 From: Khwezi Mngoma Date: Fri, 15 May 2026 22:28:18 +0200 Subject: [PATCH] Set misfireThreshold to 2min and eased Cluster node checkin limit --- LiteCharms.Features/Extensions/Quartz.cs | 6 ++++-- LiteCharms.Features/Quartz/JobOrchestrator.cs | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/LiteCharms.Features/Extensions/Quartz.cs b/LiteCharms.Features/Extensions/Quartz.cs index 28299e8..fe6103a 100644 --- a/LiteCharms.Features/Extensions/Quartz.cs +++ b/LiteCharms.Features/Extensions/Quartz.cs @@ -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); }); }); }); diff --git a/LiteCharms.Features/Quartz/JobOrchestrator.cs b/LiteCharms.Features/Quartz/JobOrchestrator.cs index ed90adf..7873683 100644 --- a/LiteCharms.Features/Quartz/JobOrchestrator.cs +++ b/LiteCharms.Features/Quartz/JobOrchestrator.cs @@ -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();