Commit cb27b325 by lcx

Merge branch 'v2020morge-graphql' of http://192.168.18.110:8880/zry/performance…

Merge branch 'v2020morge-graphql' of http://192.168.18.110:8880/zry/performance into v2020morge-graphql
parents 05146c82 dfce8fc3
...@@ -170,17 +170,17 @@ public ApiResponse Import([FromForm] IFormCollection form) ...@@ -170,17 +170,17 @@ public ApiResponse Import([FromForm] IFormCollection form)
_configService.Clear(allot.ID); _configService.Clear(allot.ID);
} }
var email = _claim.GetUserClaim(JwtClaimTypes.Mail); //var email = _claim.GetUserClaim(JwtClaimTypes.Mail);
if (allot.States == (int)AllotStates.FileUploaded) //if (allot.States == (int)AllotStates.FileUploaded)
_backgroundTaskQueue.QueueBackgroundWorkItem(async token => // _backgroundTaskQueue.QueueBackgroundWorkItem(async token =>
{ // {
using (var scope = _serviceScopeFactory.CreateScope()) // using (var scope = _serviceScopeFactory.CreateScope())
{ // {
var scopedServices = scope.ServiceProvider.GetRequiredService<AllotService>(); // var scopedServices = scope.ServiceProvider.GetRequiredService<AllotService>();
scopedServices.Generate(allot, email); // scopedServices.Generate(allot, email);
await Task.Delay(TimeSpan.FromSeconds(5), token); // await Task.Delay(TimeSpan.FromSeconds(5), token);
} // }
}); // });
return new ApiResponse(ResponseType.OK, true); return new ApiResponse(ResponseType.OK, true);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment