From 2175ae0e97d9df2aed41a2ce8550b692fa149c4b Mon Sep 17 00:00:00 2001 From: -LAN- Date: Wed, 18 Mar 2026 17:38:24 +0800 Subject: [PATCH] refactor: make code simpler Signed-off-by: -LAN- --- api/core/workflow/workflow_entry.py | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/api/core/workflow/workflow_entry.py b/api/core/workflow/workflow_entry.py index 01f77db4f0..36d021eb45 100644 --- a/api/core/workflow/workflow_entry.py +++ b/api/core/workflow/workflow_entry.py @@ -90,25 +90,15 @@ class _WorkflowChildEngineBuilder: command_channel = InMemoryChannel() config = GraphEngineConfig() - if self._execution_context is None: - child_engine = GraphEngine( - workflow_id=workflow_id, - graph=child_graph, - graph_runtime_state=graph_runtime_state, - command_channel=command_channel, - config=config, - child_engine_builder=self, - ) - else: - child_engine = GraphEngine( - workflow_id=workflow_id, - graph=child_graph, - graph_runtime_state=graph_runtime_state, - command_channel=command_channel, - config=config, - child_engine_builder=self, - execution_context=self._execution_context, - ) + child_engine = GraphEngine( + workflow_id=workflow_id, + graph=child_graph, + graph_runtime_state=graph_runtime_state, + command_channel=command_channel, + config=config, + child_engine_builder=self, + execution_context=self._execution_context, + ) child_engine.layer(LLMQuotaLayer()) for layer in layers: child_engine.layer(cast(GraphEngineLayer, layer))