From 3dec206548533bfe02a4bd2ccb60560c1757bb45 Mon Sep 17 00:00:00 2001 From: Sipke Schoorstra Date: Tue, 5 Nov 2024 22:39:59 +0100 Subject: [PATCH] Update Quartz services to Singleton Changed QuartzWorkflowScheduler and QuartzCronParser to singleton services to ensure a single instance is used throughout the application. This modification aims to improve resource management and consistency in scheduling operations. --- src/modules/Elsa.Quartz/Features/QuartzSchedulerFeature.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/Elsa.Quartz/Features/QuartzSchedulerFeature.cs b/src/modules/Elsa.Quartz/Features/QuartzSchedulerFeature.cs index d9d0765745..cc3b2f60ea 100644 --- a/src/modules/Elsa.Quartz/Features/QuartzSchedulerFeature.cs +++ b/src/modules/Elsa.Quartz/Features/QuartzSchedulerFeature.cs @@ -35,8 +35,8 @@ public override void Configure() public override void Apply() { Services.AddSingleton(); - Services.AddScoped(); - Services.AddScoped(); + Services.AddSingleton(); + Services.AddSingleton(); Services.AddQuartz(quartz => quartz .AddJob(job => job.WithIdentity(RunWorkflowJob.JobKey).StoreDurably()) .AddJob(job => job.WithIdentity(ResumeWorkflowJob.JobKey).StoreDurably()));