From 6190c7b6daf1e62c9bdf143787eac319c4849170 Mon Sep 17 00:00:00 2001 From: zxstty Date: Sun, 20 Apr 2025 15:56:41 +0800 Subject: [PATCH] =?UTF-8?q?call=E8=A2=AB=E5=88=A0=E9=99=A4flow=E5=AD=98?= =?UTF-8?q?=E5=82=A8=E6=97=B6node=E7=9A=84node=E5=8F=98=E4=B8=BAEmpty?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/manager/appcenter.py | 1 - apps/manager/flow.py | 4 ++-- apps/service/flow.py | 10 +++++++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/apps/manager/appcenter.py b/apps/manager/appcenter.py index 9f0ae664..9631ac9a 100644 --- a/apps/manager/appcenter.py +++ b/apps/manager/appcenter.py @@ -97,7 +97,6 @@ class AppCenterManager: :return: 应用列表, 总应用数 """ try: - # 搜索条件 if search_type == SearchType.AUTHOR: if keyword not in user_sub: return [], 0 diff --git a/apps/manager/flow.py b/apps/manager/flow.py index 75229ac8..3cfe2d90 100644 --- a/apps/manager/flow.py +++ b/apps/manager/flow.py @@ -259,11 +259,11 @@ class FlowManager: debug=flow_config.debug, ) for node_id, node_config in flow_config.steps.items(): + input_parameters = node_config.params if node_config.node not in ("Empty"): - input_parameters = node_config.params _, output_parameters = await NodeManager.get_node_params(node_config.node) else: - input_parameters, output_parameters = {}, {} + output_parameters = {} parameters = { "input_parameters": input_parameters, "output_parameters": output_parameters, diff --git a/apps/service/flow.py b/apps/service/flow.py index 3f4e0573..1fe71d6b 100644 --- a/apps/service/flow.py +++ b/apps/service/flow.py @@ -39,8 +39,16 @@ class FlowService: """移除流程图中的多余结构""" node_branch_map = {} branch_illegal_chars = "." - for node in flow_item.nodes: + from apps.scheduler.pool.pool import Pool + from pydantic import BaseModel + try: + call_class: type[BaseModel] = await Pool().get_call(node.call_id) + except Exception as e: + logger.error(f"[FlowService] 获取步骤的call_id失败{node.call_id}") + raise Exception(e) + if not call_class: + node.node = 'Empty' node_branch_map[node.step_id] = set() if node.call_id == NodeType.CHOICE.value: node.parameters = node.parameters["input_parameters"] -- Gitee