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

Method _get_pending_count

src/services/load_balancer.py:29–35  ·  view source on GitHub ↗
(self, token_id: int, for_image_generation: bool, for_video_generation: bool)

Source from the content-addressed store, hash-verified

27 self._rr_lock = asyncio.Lock()
28
29 async def _get_pending_count(self, token_id: int, for_image_generation: bool, for_video_generation: bool) -> int:
30 async with self._pending_lock:
31 if for_image_generation:
32 return max(0, int(self._image_pending.get(token_id, 0)))
33 if for_video_generation:
34 return max(0, int(self._video_pending.get(token_id, 0)))
35 return 0
36
37 async def _add_pending(self, token_id: int, for_image_generation: bool, for_video_generation: bool):
38 async with self._pending_lock:

Callers 1

_get_token_loadMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected