auto-sync: 2026-05-31 08:43:38
This commit is contained in:
@@ -1096,7 +1096,7 @@ curl -X POST http://{api_host}:{api_port}/api/projects/{project_id}/tasks/{task_
|
||||
main_session = sessions.get(main_key, {})
|
||||
result["status"] = main_session.get("status", "unknown")
|
||||
|
||||
# 检查 lock
|
||||
# 检查 lock (v3.1: done/timeout 时 lock 视为过期)
|
||||
sf = main_session.get("sessionFile", "")
|
||||
if sf:
|
||||
lock_path = Path(sf + ".lock")
|
||||
@@ -1112,6 +1112,10 @@ curl -X POST http://{api_host}:{api_port}/api/projects/{project_id}/tasks/{task_
|
||||
result["lock_pid_alive"] = True
|
||||
except ProcessLookupError:
|
||||
result["lock_pid_alive"] = False
|
||||
# session 已完成/超时 > lock 是 Gateway 冷却锁,不阻塞新 turn
|
||||
if result["status"] in ("done", "timeout"):
|
||||
result["lock_pid_alive"] = False
|
||||
result["lock_expired"] = True
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user