Add WORKFLOW_CALL_MAX_DEPTH env var. (#4713)
This commit is contained in:
parent
705a6e3a8e
commit
72a90074bc
3 changed files with 10 additions and 4 deletions
|
|
@ -54,8 +54,6 @@ node_classes = {
|
|||
NodeType.PARAMETER_EXTRACTOR: ParameterExtractorNode
|
||||
}
|
||||
|
||||
WORKFLOW_CALL_MAX_DEPTH = 5
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
|
@ -128,8 +126,9 @@ class WorkflowEngineManager:
|
|||
user_inputs=user_inputs
|
||||
)
|
||||
|
||||
if call_depth > WORKFLOW_CALL_MAX_DEPTH:
|
||||
raise ValueError('Max workflow call depth reached.')
|
||||
workflow_call_max_depth = current_app.config.get("WORKFLOW_CALL_MAX_DEPTH")
|
||||
if call_depth > workflow_call_max_depth:
|
||||
raise ValueError('Max workflow call depth {} reached.'.format(workflow_call_max_depth))
|
||||
|
||||
# init workflow run state
|
||||
workflow_run_state = WorkflowRunState(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue