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

Method _add_pending

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

Source from the content-addressed store, hash-verified

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:
39 if for_image_generation:
40 self._image_pending[token_id] = max(0, int(self._image_pending.get(token_id, 0))) + 1
41 elif for_video_generation:
42 self._video_pending[token_id] = max(0, int(self._video_pending.get(token_id, 0))) + 1
43
44 async def release_pending(self, token_id: int, for_image_generation: bool = False, for_video_generation: bool = False):
45 async with self._pending_lock:

Callers 1

select_tokenMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected