Switched to standard MonIn library
This commit is contained in:
@ -17,7 +17,7 @@ builder.Logging.AddNLog();
|
||||
builder.Services.AddHttpClient();
|
||||
|
||||
builder.Services.AddScoped<IDbConnectionService, DbConnectionService>();
|
||||
builder.Services.AddScoped<IMonInWorkerClient, MonInWorkerClient>();
|
||||
builder.Services.AddScoped<IMonInClient, MonInClient>();
|
||||
builder.Services.AddScoped<IDalService, DalService>();
|
||||
builder.Services.AddScoped<SmtpClient>((serviceProvider) => {
|
||||
return new SmtpClient("mailrelay-external.infineon.com");
|
||||
@ -27,6 +27,7 @@ builder.Services.AddScoped<ISmtpService, SmtpService>();
|
||||
|
||||
builder.Services.AddScoped<IUserService, UserService>();
|
||||
builder.Services.AddScoped<IECNService, ECNService>();
|
||||
builder.Services.AddScoped<ITrainingService, TrainingService>();
|
||||
|
||||
builder.Services.AddQuartz(q => {
|
||||
JobKey pendingOOOStatusJob = new JobKey("Pending OOO status job");
|
||||
@ -46,7 +47,7 @@ builder.Services.AddQuartz(q => {
|
||||
q.AddTrigger(opts => opts
|
||||
.ForJob(expiredOOOStatusJob)
|
||||
.WithIdentity("Expired OOO status trigger")
|
||||
.WithCronSchedule(CronScheduleBuilder.DailyAtHourAndMinute(0, 0))
|
||||
.WithCronSchedule(CronScheduleBuilder.DailyAtHourAndMinute(10, 52))
|
||||
);
|
||||
|
||||
JobKey expiringTECNJob = new JobKey("Expiring TECN job");
|
||||
@ -56,11 +57,17 @@ builder.Services.AddQuartz(q => {
|
||||
q.AddTrigger(opts => opts
|
||||
.ForJob(expiringTECNJob)
|
||||
.WithIdentity("Expiring TECN trigger")
|
||||
.WithSimpleSchedule(x => x
|
||||
.WithIntervalInMinutes(10)
|
||||
.RepeatForever()
|
||||
)
|
||||
.StartNow()
|
||||
.WithCronSchedule(CronScheduleBuilder.DailyAtHourAndMinute(6, 0))
|
||||
);
|
||||
|
||||
JobKey expiredTECNJob = new JobKey("Expired TECN job");
|
||||
q.AddJob<ExpiredTECNWorker>(opts => opts
|
||||
.WithIdentity(expiredTECNJob)
|
||||
);
|
||||
q.AddTrigger(opts => opts
|
||||
.ForJob(expiredTECNJob)
|
||||
.WithIdentity("Expired TECN trigger")
|
||||
.WithCronSchedule(CronScheduleBuilder.DailyAtHourAndMinute(6, 0))
|
||||
);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user