auto-sync: 2026-05-21 12:13:13
This commit is contained in:
@@ -484,7 +484,7 @@ class Ticker:
|
|||||||
司马懿建议:攒一批任务,一次广播,而非每个任务触发一次广播。
|
司马懿建议:攒一批任务,一次广播,而非每个任务触发一次广播。
|
||||||
广播前检查全局并发,接近上限时跳过。
|
广播前检查全局并发,接近上限时跳过。
|
||||||
"""
|
"""
|
||||||
if not getattr(self, 'dispatcher', None) or not self.spawner:
|
if not self.spawner:
|
||||||
return []
|
return []
|
||||||
|
|
||||||
# 全局并发检查(司马懿建议 1)
|
# 全局并发检查(司马懿建议 1)
|
||||||
@@ -593,6 +593,11 @@ class Ticker:
|
|||||||
4. 没有适合你的任务则退出
|
4. 没有适合你的任务则退出
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@property
|
||||||
|
def counter(self):
|
||||||
|
"""从 Dispatcher 获取 counter"""
|
||||||
|
return getattr(self.dispatcher, 'counter', None) if self.dispatcher else None
|
||||||
|
|
||||||
def _get_idle_agents(self) -> List[str]:
|
def _get_idle_agents(self) -> List[str]:
|
||||||
"""获取当前空闲的 Agent 列表"""
|
"""获取当前空闲的 Agent 列表"""
|
||||||
if not self.counter:
|
if not self.counter:
|
||||||
|
|||||||
Reference in New Issue
Block a user