auto-sync: 2026-05-26 08:26:12
This commit is contained in:
@@ -671,6 +671,16 @@ class Ticker:
|
||||
"""从 Dispatcher 获取 counter"""
|
||||
return getattr(self.dispatcher, 'counter', None) if self.dispatcher else None
|
||||
|
||||
@staticmethod
|
||||
def _is_pid_alive(pid: int) -> bool:
|
||||
"""检查进程是否存活"""
|
||||
import os
|
||||
try:
|
||||
os.kill(pid, 0)
|
||||
return True
|
||||
except (ProcessLookupError, PermissionError):
|
||||
return False
|
||||
|
||||
def _get_idle_agents(self) -> List[str]:
|
||||
"""获取当前空闲的 Agent 列表(从 config agents 取,而非 counter._per_agent)"""
|
||||
if not self.counter:
|
||||
|
||||
Reference in New Issue
Block a user