fix 增加判断下载逻辑
This commit is contained in:
@@ -46,10 +46,13 @@ public class Startup : DefaultStartup
|
||||
{
|
||||
base.Configure(app, env);
|
||||
|
||||
if (Configuration.GetSection("Download").Value == "1")
|
||||
{
|
||||
using var scope = app.ApplicationServices.CreateScope();
|
||||
var factory = Configuration.GetSection("Factory").Value;
|
||||
|
||||
var ds = scope.ServiceProvider.GetService<IDataDownloadService>();
|
||||
ds.InitAsync(factory).Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user