| | |
| | | using System.Collections.Concurrent; |
| | | using LB_SmartVisionCommon; |
| | | using System.Collections.Concurrent; |
| | | using System.Diagnostics; |
| | | using System.Xml.Linq; |
| | | |
| | |
| | | await ExecuteNodeAsync(currentNode, ExecutionContext); |
| | | |
| | | // 防止死循环,运行时间超过60秒则强制终止 |
| | | if ((DateTime.Now - StartTime).TotalSeconds > 1000000000) |
| | | if ((DateTime.Now - StartTime).TotalSeconds > 10) |
| | | { |
| | | _cancellationTokenSource.Cancel(); |
| | | NodesMsg = $"执行所有节点超过10s"; |
| | |
| | | bool result = Context.ExecuteNode(currentNode); |
| | | #if DEBUG |
| | | Debug.WriteLine(DateTime.Now.ToString("[yyyy:MM:dd:HH:mm:ss:fff] ") + $"执行节点[{currentNode.Text}],结果为{result}"); |
| | | AsyncLogHelper.Debug(DateTime.Now.ToString("[yyyy:MM:dd:HH:mm:ss:fff] ") + $"执行节点[{currentNode.Text}],结果为{result}"); |
| | | #endif |
| | | context.BranchResults.TryAdd(context.CurrentBranchName, currentNode.Result); |
| | | currentNode.Result = result; |