diff --git a/dbm-ui/backend/flow/engine/bamboo/scene/spider/common/common_sub_flow.py b/dbm-ui/backend/flow/engine/bamboo/scene/spider/common/common_sub_flow.py index dc71221605..905fd5e42f 100644 --- a/dbm-ui/backend/flow/engine/bamboo/scene/spider/common/common_sub_flow.py +++ b/dbm-ui/backend/flow/engine/bamboo/scene/spider/common/common_sub_flow.py @@ -719,7 +719,8 @@ def reduce_ctls_routing(root_id: str, parent_global_data: dict, cluster: Cluster ), } ) - sub_pipeline.add_parallel_acts(acts_list=acts_list) + if len(acts_list) > 0: + sub_pipeline.add_parallel_acts(acts_list=acts_list) return sub_pipeline.build_sub_process(sub_name=_("删除中控的路由节点")) diff --git a/dbm-ui/backend/flow/engine/bamboo/scene/spider/spider_reduce_nodes.py b/dbm-ui/backend/flow/engine/bamboo/scene/spider/spider_reduce_nodes.py index fc352c1e20..a7529604ae 100644 --- a/dbm-ui/backend/flow/engine/bamboo/scene/spider/spider_reduce_nodes.py +++ b/dbm-ui/backend/flow/engine/bamboo/scene/spider/spider_reduce_nodes.py @@ -87,7 +87,7 @@ def __calc_reduce_spiders( # 选择上尽量避开ctl_primary的选择, 避免做一次切换逻辑 reduce_spiders = cluster.proxyinstance_set.filter( tendbclusterspiderext__spider_role=reduce_spider_role - ).exclude(machine__ip=ctl_primary.split(":"[0]))[: spiders_count - spider_reduced_to_count] + ).exclude(machine__ip=ctl_primary.split(":")[0])[: spiders_count - spider_reduced_to_count] return [{"ip": s.machine.ip} for s in reduce_spiders]