Addressing Mike's last comment.
This commit is contained in:
parent
8c9cbade5d
commit
8a55a8252d
|
@ -509,34 +509,18 @@ class Orchestrator {
|
||||||
|
|
||||||
for (const branch of branches) {
|
for (const branch of branches) {
|
||||||
if (await branchMatches(ctx, branch)) {
|
if (await branchMatches(ctx, branch)) {
|
||||||
const steps = children?.[branch.id] || []
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
{
|
stepSuccess(step, {
|
||||||
id: step.id,
|
branchName: branch.name,
|
||||||
stepId: step.stepId,
|
status: `${branch.name} branch taken`,
|
||||||
inputs: step.inputs,
|
branchId: `${branch.id}`,
|
||||||
outputs: {
|
}),
|
||||||
success: true,
|
...(await this.executeSteps(ctx, children?.[branch.id] || [])),
|
||||||
branchName: branch.name,
|
|
||||||
status: `${branch.name} branch taken`,
|
|
||||||
branchId: `${branch.id}`,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
...(await this.executeSteps(ctx, steps)),
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.stopped = true
|
return [stepFailure(step, { status: AutomationStatus.NO_CONDITION_MET })]
|
||||||
return [
|
|
||||||
{
|
|
||||||
id: step.id,
|
|
||||||
stepId: step.stepId,
|
|
||||||
inputs: step.inputs,
|
|
||||||
outputs: { success: false, status: AutomationStatus.NO_CONDITION_MET },
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async executeStep(
|
private async executeStep(
|
||||||
|
|
Loading…
Reference in New Issue