Skip to content

Commit 29c2982

Browse files
fixed result formating and return if result exist
1 parent 196ecae commit 29c2982

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

shared.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23451,20 +23451,20 @@ func ActionSkip(ctx context.Context, foundAction Action, exec *WorkflowExecution
2345123451
_, actionResult := GetActionResult(ctx, *exec, foundAction.ID)
2345223452
if actionResult.Action.ID == foundAction.ID {
2345323453
log.Printf("[DEBUG][%s] Result already exist for the action %s (%s)", exec.ExecutionId, foundAction.Label, foundAction.ID)
23454+
return nil
2345423455
}
2345523456

2345623457
newResult := ActionResult{
2345723458
Action: foundAction,
2345823459
ExecutionId: exec.ExecutionId,
2345923460
Authorization: exec.Authorization,
23460-
Result: fmt.Sprintf(`{"success": false, "reason": "Skipped because of previous node - %d" - %v}`, len(parent), parent),
23461+
Result: fmt.Sprintf(`{"success": false, "reason": "Skipped because of previous node - %d - %v"}`, len(parent), parent),
2346123462
StartedAt: 0,
2346223463
CompletedAt: 0,
2346323464
Status: "SKIPPED",
2346423465
}
2346523466
resultData, err := json.Marshal(newResult)
2346623467
if err != nil {
23467-
log.Printf("[ERROR] Failed skipping action")
2346823468
return err
2346923469
}
2347023470

0 commit comments

Comments
 (0)