Created CA follow up worker

This commit is contained in:
Chase Tucker
2024-04-11 13:20:33 -07:00
parent ed89f25dad
commit 83165bbdd7
16 changed files with 701 additions and 44 deletions

@ -28,6 +28,7 @@ builder.Services.AddScoped<ISmtpService, SmtpService>();
builder.Services.AddScoped<IUserService, UserService>();
builder.Services.AddScoped<IECNService, ECNService>();
builder.Services.AddScoped<ITrainingService, TrainingService>();
builder.Services.AddScoped<ICorrectiveActionService, CorrectiveActionService>();
builder.Services.AddQuartz(q => {
JobKey pendingOOOStatusJob = new JobKey("Pending OOO status job");
@ -69,6 +70,26 @@ builder.Services.AddQuartz(q => {
.WithIdentity("Expired TECN trigger")
.WithCronSchedule(CronScheduleBuilder.DailyAtHourAndMinute(6, 0))
);
JobKey trainingReminderJob = new JobKey("Training reminder job");
q.AddJob<TrainingNotificationWorker>(opts => opts
.WithIdentity(trainingReminderJob)
);
q.AddTrigger(opts => opts
.ForJob(trainingReminderJob)
.WithIdentity("Training reminder trigger")
.WithCronSchedule(CronScheduleBuilder.DailyAtHourAndMinute(6, 0))
);
JobKey caFollowUpJob = new JobKey("CA follow up job");
q.AddJob<CAFollowUpWorker>(opts => opts
.WithIdentity(caFollowUpJob)
);
q.AddTrigger(opts => opts
.ForJob(caFollowUpJob)
.WithIdentity("CA follow up trigger")
.WithCronSchedule(CronScheduleBuilder.DailyAtHourAndMinute(6, 0))
);
});
builder.Services.AddQuartzHostedService(opt => {