Added SHUFFLE_MAX_EXECUTION_DEPTH for subflows to be able to go lower than 10 subflows
This commit is contained in:
@@ -3289,7 +3289,8 @@ class AppBase:
|
||||
}))
|
||||
|
||||
if parameter["name"] == "body":
|
||||
self.logger.info(f"[INFO] Should debug field with liquid and other checks as it's BODY: {value}")
|
||||
#self.logger.info(f"[INFO] Should debug field with liquid and other checks as it's BODY: {value}")
|
||||
pass
|
||||
|
||||
# Custom format for ${name[0,1,2,...]}$
|
||||
#submatch = "([${]{2}([0-9a-zA-Z_-]+)(\[.*\])[}$]{2})"
|
||||
|
||||
@@ -1056,7 +1056,15 @@ func handleExecution(id string, workflow shuffle.Workflow, request *http.Request
|
||||
return shuffle.WorkflowExecution{}, fmt.Sprintf(`workflow %s is invalid`, workflow.ID), errors.New("Failed getting workflow")
|
||||
}
|
||||
|
||||
workflowExecution, execInfo, _, err := shuffle.PrepareWorkflowExecution(ctx, workflow, request, 10)
|
||||
maxExecutionDepth := 10
|
||||
if 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)
|
||||
if err != nil {
|
||||
err = shuffle.SetWorkflowExecution(ctx, workflowExecution, true)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user