MCPcopy Create free account
hub / github.com/TheSmallHanCat/flow2api / __init__

Method __init__

src/services/load_balancer.py:20–27  ·  view source on GitHub ↗
(self, token_manager, concurrency_manager: Optional[ConcurrencyManager] = None)

Source from the content-addressed store, hash-verified

18class LoadBalancer:
19 """Token load balancer with load-aware selection"""
20
21 def __init__(
22 self, token_manager, concurrency_manager: Optional[ConcurrencyManager] = None
23 ):
24 self.token_manager = token_manager
25 self.concurrency_manager = concurrency_manager
26 self._image_pending: Dict[int, int] = {}
27 self._video_pending: Dict[int, int] = {}
28 self._pending_lock = asyncio.Lock()
29 self._round_robin_state: Dict[str, Optional[int]] = {
30 "image": None,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected