Skip to content

Commit 07cf690

Browse files
committed
fix possible crash
1 parent cfea274 commit 07cf690

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

unilabos/app/ws_client.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,6 +1184,11 @@ def _send_busy_status(self):
11841184
logger.debug(f"[QueueProcessor] Sending busy status for {len(queued_jobs)} queued jobs")
11851185

11861186
for job_info in queued_jobs:
1187+
# 快照可能已过期:在遍历过程中 end_job() 可能已将此 job 移至 READY,
1188+
# 此时不应再发送 busy/need_more,否则会覆盖已发出的 free=True 通知
1189+
if job_info.status != JobStatus.QUEUE:
1190+
continue
1191+
11871192
message = {
11881193
"action": "report_action_state",
11891194
"data": {

0 commit comments

Comments
 (0)