Addressing Mike's last comment.

This commit is contained in:
Sam Rose 2025-02-13 17:51:55 +00:00
parent 8c9cbade5d
commit 8a55a8252d
No known key found for this signature in database
1 changed files with 7 additions and 23 deletions

View File

@ -509,34 +509,18 @@ class Orchestrator {
for (const branch of branches) {
if (await branchMatches(ctx, branch)) {
const steps = children?.[branch.id] || []
return [
{
id: step.id,
stepId: step.stepId,
inputs: step.inputs,
outputs: {
success: true,
branchName: branch.name,
status: `${branch.name} branch taken`,
branchId: `${branch.id}`,
},
},
...(await this.executeSteps(ctx, steps)),
stepSuccess(step, {
branchName: branch.name,
status: `${branch.name} branch taken`,
branchId: `${branch.id}`,
}),
...(await this.executeSteps(ctx, children?.[branch.id] || [])),
]
}
}
this.stopped = true
return [
{
id: step.id,
stepId: step.stepId,
inputs: step.inputs,
outputs: { success: false, status: AutomationStatus.NO_CONDITION_MET },
},
]
return [stepFailure(step, { status: AutomationStatus.NO_CONDITION_MET })]
}
private async executeStep(