chore(docs): put all actions into single panel

This commit is contained in:
braks
2024-02-08 20:07:50 +01:00
committed by Braks
parent fafad1e721
commit caf874dd49
4 changed files with 66 additions and 36 deletions
+7 -5
View File
@@ -9,7 +9,7 @@ import { useVueFlow } from '@vue-flow/core'
*
* When a node has multiple descendants, it will run them in parallel.
*/
export function useRunProcess(dagreGraph) {
export function useRunProcess({ dagreGraph, cancelOnError = true }) {
const { updateNodeData, getConnectedEdges } = useVueFlow()
const graph = toRef(() => toValue(dagreGraph))
@@ -49,11 +49,13 @@ export function useRunProcess(dagreGraph) {
if (!isStart && willThrowError) {
updateNodeData(node.id, { isRunning: false, hasError: true })
await skipDescendants(node.id)
runningTasks.delete(node.id)
if (toValue(cancelOnError)) {
await skipDescendants(node.id)
runningTasks.delete(node.id)
resolve()
return
resolve()
return
}
}
updateNodeData(node.id, { isRunning: false, isFinished: true })