Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(backend): 更新mysql互斥表 #8598 #8599

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading