任务执行:记日志报mysql异常的问题

usertest
zhangxiaofeng 4 months ago
parent 67520a58ec
commit c75c247aba

@ -309,7 +309,7 @@ namespace DS.WMS.Core.TaskPlat
flowLogDetail.ElapsedMillisecond = stopwatch.ElapsedMilliseconds; flowLogDetail.ElapsedMillisecond = stopwatch.ElapsedMilliseconds;
flowLogDetail.IsComplete = true; flowLogDetail.IsComplete = true;
await tenantDb.Insertable(flowLogDetail).ExecuteCommandAsync(); await tenantDb.CopyNew().Insertable(flowLogDetail).ExecuteCommandAsync();
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -329,7 +329,7 @@ namespace DS.WMS.Core.TaskPlat
flowLogDetail.IsComplete = false; flowLogDetail.IsComplete = false;
flowLogDetail.IsSuccess = false; flowLogDetail.IsSuccess = false;
await tenantDb.Insertable(flowLogDetail).ExecuteCommandAsync(); await tenantDb.CopyNew().Insertable(flowLogDetail).ExecuteCommandAsync();
if (executeConfig.IsExceptionContinue) if (executeConfig.IsExceptionContinue)
{ {
@ -342,7 +342,7 @@ namespace DS.WMS.Core.TaskPlat
} }
} }
await tenantDb.Insertable(flowLog).ExecuteCommandAsync(); await tenantDb.CopyNew().Insertable(flowLog).ExecuteCommandAsync();
return (flowLog.Id, flowLog.IsComplete, flowLog.IsSuccess); return (flowLog.Id, flowLog.IsComplete, flowLog.IsSuccess);
} }

Loading…
Cancel
Save