fix: correct log format issue.
This commit is contained in:
parent
5962b5510b
commit
93842ee9cf
@ -10,7 +10,7 @@ import { orderBy } from 'lodash-es'
|
||||
|
||||
const formatToTracingNodeList = (list: NodeTracing[], t: any) => {
|
||||
const allItems = cloneDeep([...list]).sort((a, b) => a.index - b.index)
|
||||
const loopRelatedList = allItems.filter(item => (item.execution_metadata?.loop_id || item.node_type === BlockEnum.Loop))
|
||||
const loopRelatedListIds = allItems.filter(item => (!!item.execution_metadata?.loop_id || item.node_type === BlockEnum.Loop)).map(x => x.id)
|
||||
/*
|
||||
* First handle not change list structure node
|
||||
* Because Handle struct node will put the node in different
|
||||
@ -18,9 +18,9 @@ const formatToTracingNodeList = (list: NodeTracing[], t: any) => {
|
||||
const formattedAgentList = formatAgentNode(allItems)
|
||||
const formattedRetryList = formatRetryNode(formattedAgentList) // retry one node
|
||||
// would change the structure of the list. Iteration and parallel can include each other.
|
||||
const formattedIterationList = formatIterationNode(formattedRetryList.filter(item => !loopRelatedList.includes(item)), t)
|
||||
const formattedLoopList = formatLoopNode(loopRelatedList, t)
|
||||
const orderedNodeList = orderBy([...formattedIterationList, ...formattedLoopList], 'index', 'asc')
|
||||
const formattedIterationList = formatIterationNode(formattedRetryList.filter(item => !loopRelatedListIds.includes(item.id)), t)
|
||||
const formattedLoopList = formatLoopNode(formattedRetryList.filter(item => loopRelatedListIds.includes(item.id)), t)
|
||||
const orderedNodeList = orderBy([...formattedIterationList, ...formattedLoopList], 'finished_at', 'asc')
|
||||
const formattedParallelList = formatParallelNode(orderedNodeList, t)
|
||||
|
||||
const result = formattedParallelList
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user