Made MAX EXECUTION DEPTH be followed for further recursion than 10

This commit is contained in:
Frikky
2024-01-25 12:05:25 +01:00
parent f10e382565
commit 7a6970e3d6
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -1060,13 +1060,13 @@ func handleExecution(id string, workflow shuffle.Workflow, request *http.Request
maxExecutionDepth := 10
if os.Getenv("SHUFFLE_MAX_EXECUTION_DEPTH") != "" {
maxExecutionDepthNew, err = strconv.Atoi(os.Getenv("SHUFFLE_MAX_EXECUTION_DEPTH"))
maxExecutionDepthNew, err := strconv.Atoi(os.Getenv("SHUFFLE_MAX_EXECUTION_DEPTH"))
if err == nil && maxExecutionDepthNew > 1 && maxExecutionDepthNew < 1000 {
maxExecutionDepth = maxExecutionDepthNew
}
}
workflowExecution, execInfo, _, err := shuffle.PrepareWorkflowExecution(ctx, workflow, request, maxExecutionDepth)
workflowExecution, execInfo, _, err := shuffle.PrepareWorkflowExecution(ctx, workflow, request, int64(maxExecutionDepth))
if err != nil {
err = shuffle.SetWorkflowExecution(ctx, workflowExecution, true)
if err != nil {