diff --git a/src/blackboard/queries.py b/src/blackboard/queries.py index f9cd3c1..c974622 100644 --- a/src/blackboard/queries.py +++ b/src/blackboard/queries.py @@ -258,14 +258,14 @@ class Queries: if status_counts.get("pending", 0) > 0: return "pending" + # 有 failed → failed(优先于 blocked:失败比等待更严重) + if status_counts.get("failed", 0) > 0: + return "failed" + # 有 blocked → blocked if status_counts.get("blocked", 0) > 0: return "blocked" - # 有 failed → failed - if status_counts.get("failed", 0) > 0: - return "failed" - return parent_row["status"] finally: conn.close()