Skip to content

Commit

Permalink
fix[user-input]: making it work for onprem
Browse files Browse the repository at this point in the history
  • Loading branch information
0x0elliot committed Jun 3, 2024
1 parent d12a122 commit 7cb472e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -17719,6 +17719,8 @@ func PrepareWorkflowExecution(ctx context.Context, workflow Workflow, request *h
log.Printf("\n\n[DEBUG][%s] Worker user input restart. What do? Should we ever reach this point?\n\n")
} else {

updateMade := true

log.Printf("[DEBUG][%s] Re-adding user input execution to db & queue after re-setting result back", result.ExecutionId)
oldExecution.Status = "EXECUTING"

Expand All @@ -17731,6 +17733,7 @@ func PrepareWorkflowExecution(ctx context.Context, workflow Workflow, request *h

err = SetWorkflowExecution(ctx, *oldExecution, true)
if err != nil {
updateMade = false
log.Printf("[ERROR] Failed setting workflow execution actionresult in execution: %s", err)
}

Expand All @@ -17752,8 +17755,13 @@ func PrepareWorkflowExecution(ctx context.Context, workflow Workflow, request *h

err = SetWorkflowQueue(ctx, executionRequest, parsedEnv)
if err != nil {
updateMade = false
log.Printf("[ERROR] Failed re-adding User Input execution to db: %s", err)
}

if updateMade {
return *oldExecution, ExecInfo{}, "", errors.New("User Input: Execution action skipped!")
}
}
}

Expand Down

0 comments on commit 7cb472e

Please sign in to comment.