auto-sync: 2026-05-21 12:26:45

This commit is contained in:
cfdaily
2026-05-21 12:26:45 +08:00
parent a9866adad4
commit f9eb22beb1
+8
View File
@@ -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