remove scheduler from web
This commit is contained in:
parent
681583b3f0
commit
d1fc258f19
@ -25,14 +25,6 @@ namespace EnvelopeGenerator.Web
|
|||||||
q.JsonSerializerOptions.ReferenceHandler = System.Text.Json.Serialization.ReferenceHandler.IgnoreCycles;
|
q.JsonSerializerOptions.ReferenceHandler = System.Text.Json.Serialization.ReferenceHandler.IgnoreCycles;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Configure and start scheduler
|
|
||||||
builder.Services.AddQuartz(q =>
|
|
||||||
{
|
|
||||||
Scheduler scheduler = InitScheduler(builder);
|
|
||||||
scheduler.ScheduleJob<Common.Jobs.CertificateDocumentJob>(q, "CertificateDocument", 1);
|
|
||||||
});
|
|
||||||
builder.Services.AddQuartzHostedService();
|
|
||||||
|
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
|
|
||||||
// Configure the HTTP request pipeline.
|
// Configure the HTTP request pipeline.
|
||||||
@ -54,19 +46,5 @@ namespace EnvelopeGenerator.Web
|
|||||||
|
|
||||||
app.Run();
|
app.Run();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static LogConfig InitLogger(WebApplicationBuilder builder)
|
|
||||||
{
|
|
||||||
string logPath = builder.Configuration.GetValue<string>("Config:LogPath");
|
|
||||||
return new LogConfig(LogConfig.PathType.CustomPath, logPath, "Scheduler", "Digital Data", "ECM.EnvelopeGenerator.Web");
|
|
||||||
}
|
|
||||||
|
|
||||||
private static Scheduler InitScheduler( WebApplicationBuilder builder)
|
|
||||||
{
|
|
||||||
LogConfig logConfig = InitLogger(builder);
|
|
||||||
string connectionString = builder.Configuration.GetValue<string>("Config:ConnectionString");
|
|
||||||
Scheduler scheduler = new(logConfig, connectionString);
|
|
||||||
return scheduler;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user