fix 优化健康检查,数据同步
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using Dlhis.Middle.BackgroundServices;
|
||||
using Dlhis.Middle.Services;
|
||||
using Kurisu.AspNetCore;
|
||||
using Kurisu.AspNetCore.Startup;
|
||||
using Microsoft.IdentityModel.Logging;
|
||||
@@ -31,18 +30,4 @@ public class Startup : DefaultStartup
|
||||
services.AddRemoteCall(App.ActiveTypes);
|
||||
services.AddMemoryCache();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
{
|
||||
base.Configure(app, env);
|
||||
|
||||
if (Configuration.GetSection("Download").Value == "1")
|
||||
{
|
||||
using var scope = app.ApplicationServices.CreateScope();
|
||||
var factories = scope.ServiceProvider.GetService<ISettingService>().GetFactories();
|
||||
var ds = scope.ServiceProvider.GetService<IDataDownloadService>();
|
||||
ds.InitAsync(factories).Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user