diff --git a/src/backend/services/web/analyze/controls/rule_audit.py b/src/backend/services/web/analyze/controls/rule_audit.py index c666cfa6..f21cfc3b 100644 --- a/src/backend/services/web/analyze/controls/rule_audit.py +++ b/src/backend/services/web/analyze/controls/rule_audit.py @@ -409,7 +409,7 @@ def _update_or_create_bkbase_flow(self) -> bool: if need_create: self._create_flow() else: - self.disabled() + self.disabled(force=True) flow_id = self.strategy.backend_data["flow_id"] data_source_node_ids = self.create_or_update_data_source_nodes(need_create, flow_id) # 构建 sql 节点 @@ -533,7 +533,7 @@ def enable(self, force: bool = False) -> None: else: self._toggle_strategy(FlowStatusToggleChoices.RESTART.value, force=force) - def disabled(self) -> None: + def disabled(self, force: bool = False) -> None: flow_status = self._describe_flow_status() if flow_status in [FlowNodeStatusChoices.RUNNING, FlowNodeStatusChoices.FAILED]: - self._toggle_strategy(FlowStatusToggleChoices.STOP.value) + self._toggle_strategy(FlowStatusToggleChoices.STOP.value, force=force)