auto-sync: 2026-05-21 12:26:45
This commit is contained in:
@@ -68,6 +68,14 @@ class ActiveAgentCounter:
|
||||
def global_active(self) -> int:
|
||||
return self._global_active
|
||||
|
||||
@property
|
||||
def max_global(self) -> int:
|
||||
return self._max_global
|
||||
|
||||
@property
|
||||
def active_agents(self) -> Dict[str, int]:
|
||||
return dict(self._active)
|
||||
|
||||
def is_near_limit(self, margin: int = 1) -> bool:
|
||||
"""全局活跃数是否接近上限"""
|
||||
return self._global_active >= self._max_global - margin
|
||||
|
||||
Reference in New Issue
Block a user