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
+1
View File
@@ -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
+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 {