diff --git a/.env b/.env index 2fd946ed..e3221e33 100755 --- a/.env +++ b/.env @@ -81,6 +81,7 @@ SHUFFLE_DISABLE_RERUN_AND_ABORT=false SHUFFLE_RERUN_SCHEDULE=300 SHUFFLE_WORKER_SERVER_URL= # Definition in case Worker & Orborus is talking to the wrong server SHUFFLE_ORBORUS_PULL_TIME= # Definition in case Orborus is pulling too often/not often enough +SHUFFLE_MAX_EXECUTION_DEPTH= # Max recursion depth for subflows # DATABASE CONFIGURATIONS DATASTORE_EMULATOR_HOST=shuffle-database:8000 diff --git a/backend/go-app/walkoff.go b/backend/go-app/walkoff.go index a22bddca..659c52b3 100755 --- a/backend/go-app/walkoff.go +++ b/backend/go-app/walkoff.go @@ -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 {