fix 多钱包调整
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
using Dlhis.Middle.BackgroundServices;
|
||||
using Dlhis.Middle.Services;
|
||||
using Dlhis.Middle.Services.Implements;
|
||||
using Kurisu.AspNetCore;
|
||||
using Kurisu.AspNetCore.Startup;
|
||||
using Microsoft.IdentityModel.Logging;
|
||||
@@ -24,20 +24,11 @@ public class Startup : DefaultStartup
|
||||
public override void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
base.ConfigureServices(services);
|
||||
|
||||
services.AddHostedService<BalanceRecordUploadBackgroundService>();
|
||||
services.AddHostedService<HealthCheckBackgroundService>();
|
||||
|
||||
services.AddRemoteCall(App.ActiveTypes);
|
||||
services.AddHttpClient("face", client => { client.Timeout = TimeSpan.FromSeconds(30); }).ConfigurePrimaryHttpMessageHandler(() =>
|
||||
{
|
||||
var handler = new HttpClientHandler
|
||||
{
|
||||
ClientCertificateOptions = ClientCertificateOption.Manual,
|
||||
ServerCertificateCustomValidationCallback = (_, _, _, _) => true
|
||||
};
|
||||
|
||||
return handler;
|
||||
});
|
||||
services.AddHostedService<BalanceRecordCheckBackgroundService>();
|
||||
services.AddHostedService<HealthCheckBackgroundService>();
|
||||
services.AddMemoryCache();
|
||||
}
|
||||
|
||||
@@ -49,10 +40,9 @@ public class Startup : DefaultStartup
|
||||
if (Configuration.GetSection("Download").Value == "1")
|
||||
{
|
||||
using var scope = app.ApplicationServices.CreateScope();
|
||||
var factory = Configuration.GetSection("Factory").Value;
|
||||
|
||||
var factories = scope.ServiceProvider.GetService<ISettingService>().GetFactories();
|
||||
var ds = scope.ServiceProvider.GetService<IDataDownloadService>();
|
||||
ds.InitAsync(factory).Wait();
|
||||
ds.InitAsync(factories).Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user