fix: workflow run edge status (#3236)

This commit is contained in:
zxhlyh 2024-04-09 16:53:34 +08:00 committed by GitHub
parent 28089c98c1
commit 1384a6d0fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -176,6 +176,8 @@ export const useWorkflowRun = () => {
const {
getNodes,
setNodes,
edges,
setEdges,
} = store.getState()
setWorkflowRunningData(produce(workflowRunningData!, (draft) => {
draft.task_id = task_id
@ -192,6 +194,15 @@ export const useWorkflowRun = () => {
})
})
setNodes(newNodes)
const newEdges = produce(edges, (draft) => {
draft.forEach((edge) => {
edge.data = {
...edge.data,
_runned: false,
}
})
})
setEdges(newEdges)
if (onWorkflowStarted)
onWorkflowStarted(params)