auto-sync: 2026-05-28 22:38:12
This commit is contained in:
@@ -390,8 +390,15 @@ curl -X POST http://{self.api_host}:{self.api_port}/api/projects/{project_id}/ta
|
||||
await self.counter.acquire(agent_id, _sid_key)
|
||||
|
||||
# 3.5 on_checks_passed: 所有检查通过后的回调(session + counter)
|
||||
# 注意:如果回调抛异常,counter 已 acquire 但 subprocess 未启动,
|
||||
# wrapped_on_complete 不会执行。需在此 try/except 中手动 release。
|
||||
if on_checks_passed:
|
||||
on_checks_passed()
|
||||
try:
|
||||
on_checks_passed()
|
||||
except Exception:
|
||||
if self.counter:
|
||||
self.counter.release(agent_id, _sid_key)
|
||||
raise
|
||||
|
||||
if self.dry_run:
|
||||
logger.info("[DRY RUN] Would spawn agent %s (session=%s)", agent_id, _sid_key)
|
||||
|
||||
Reference in New Issue
Block a user