Skip to content

Commit

Permalink
fix(backend): 更新mysql互斥表 #8598
Browse files Browse the repository at this point in the history
  • Loading branch information
iSecloud committed Dec 13, 2024
1 parent c4cab07 commit 2077b5c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
Binary file modified dbm-ui/backend/ticket/exclusive_ticket.xlsx
Binary file not shown.
18 changes: 11 additions & 7 deletions dbm-ui/backend/ticket/models/ticket.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,13 +276,17 @@ def filter_inner_actives(self, cluster_id, *args, **kwargs):
"""获取集群正在 运行/失败 的inner flow的单据记录。此时认为集群会在互斥阶段"""
# 排除特定的单据,如自身单据重试排除自身
exclude_ticket_ids = kwargs.pop("exclude_ticket_ids", [])
return self.filter(
cluster_id=cluster_id,
flow__flow_type=FlowType.INNER_FLOW,
flow__status__in=[TicketFlowStatus.RUNNING, TicketFlowStatus.FAILED],
*args,
**kwargs,
).exclude(flow__ticket_id__in=exclude_ticket_ids)
return (
self.select_related("ticket")
.filter(
cluster_id=cluster_id,
flow__flow_type=FlowType.INNER_FLOW,
flow__status__in=[TicketFlowStatus.RUNNING, TicketFlowStatus.FAILED],
*args,
**kwargs,
)
.exclude(flow__ticket_id__in=exclude_ticket_ids)
)

def get_cluster_operations(self, cluster_id, **kwargs):
"""集群上的正在运行的操作列表"""
Expand Down

0 comments on commit 2077b5c

Please sign in to comment.