前后端对接重复生成BUG修复

parent f0ac9d6c
......@@ -170,17 +170,17 @@ public ApiResponse Import([FromForm] IFormCollection form)
_configService.Clear(allot.ID);
}
var email = _claim.GetUserClaim(JwtClaimTypes.Mail);
if (allot.States == (int)AllotStates.FileUploaded)
_backgroundTaskQueue.QueueBackgroundWorkItem(async token =>
{
using (var scope = _serviceScopeFactory.CreateScope())
{
var scopedServices = scope.ServiceProvider.GetRequiredService<AllotService>();
scopedServices.Generate(allot, email);
await Task.Delay(TimeSpan.FromSeconds(5), token);
}
});
//var email = _claim.GetUserClaim(JwtClaimTypes.Mail);
//if (allot.States == (int)AllotStates.FileUploaded)
// _backgroundTaskQueue.QueueBackgroundWorkItem(async token =>
// {
// using (var scope = _serviceScopeFactory.CreateScope())
// {
// var scopedServices = scope.ServiceProvider.GetRequiredService<AllotService>();
// scopedServices.Generate(allot, email);
// await Task.Delay(TimeSpan.FromSeconds(5), token);
// }
// });
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