fix 优化健康检查,数据同步

This commit is contained in:
2024-11-14 15:32:52 +08:00
parent ecf98fc1d3
commit c6593f93bc
8 changed files with 47 additions and 45 deletions

View File

@@ -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();
}
}
}