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.
This commit is contained in:
parent
98d914f29d
commit
3dec206548
|
|
@ -35,8 +35,8 @@ public class QuartzSchedulerFeature(IModule module) : FeatureBase(module)
|
|||
public override void Apply()
|
||||
{
|
||||
Services.AddSingleton<IActivityDescriptorModifier, CronActivityDescriptorModifier>();
|
||||
Services.AddScoped<QuartzWorkflowScheduler>();
|
||||
Services.AddScoped<QuartzCronParser>();
|
||||
Services.AddSingleton<QuartzCronParser>();
|
||||
Services.AddSingleton<QuartzWorkflowScheduler>();
|
||||
Services.AddQuartz(quartz => quartz
|
||||
.AddJob<RunWorkflowJob>(job => job.WithIdentity(RunWorkflowJob.JobKey).StoreDurably())
|
||||
.AddJob<ResumeWorkflowJob>(job => job.WithIdentity(ResumeWorkflowJob.JobKey).StoreDurably()));
|
||||
|
|
|
|||
Loading…
Reference in a new issue