Allowed workflow reruns from a specific node

This commit is contained in:
Frikky
2025-03-24 20:59:44 +01:00
parent 9b9e2e1048
commit a2e4d37eea
2 changed files with 18 additions and 3 deletions
+9 -2
View File
@@ -3041,9 +3041,16 @@ func executeSingleAction(resp http.ResponseWriter, request *http.Request) {
return
}
time.Sleep(2 * time.Second)
log.Printf("[INFO] Starting validation of execution %s", workflowExecution.ExecutionId)
if shouldRerun {
log.Printf("[DEBUG] Returning single action execution ID for rerun: %s", workflowExecution.ExecutionId)
resp.WriteHeader(200)
resp.Write([]byte(fmt.Sprintf(`{"success": true, "execution_id": "%s", "authorization": "%s"}`, workflowExecution.ExecutionId, workflowExecution.Authorization)))
return
}
log.Printf("[INFO] Starting validation of execution %s", workflowExecution.ExecutionId)
time.Sleep(2 * time.Second)
returnBody := shuffle.HandleRetValidation(ctx, workflowExecution, 1)
returnBytes, err := json.Marshal(returnBody)
if err != nil {