Skip to content

Commit

Permalink
Merge pull request #551 from 0RAJA/feat_rule_audit
Browse files Browse the repository at this point in the history
feat: 规则审计-策略新增/编辑-后端接口 --story=121513458
  • Loading branch information
0RAJA authored Jan 23, 2025
2 parents a690a9e + 5a2bf3d commit 70d9432
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/backend/services/web/analyze/controls/rule_audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 节点
Expand Down Expand Up @@ -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)

0 comments on commit 70d9432

Please sign in to comment.