We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a18fc81 commit a16aaa6Copy full SHA for a16aaa6
app/services/pool.py
@@ -31,6 +31,7 @@ def __init__(self) -> None:
31
self._clients.append(client)
32
self._id_map[c.id] = client
33
self._round_robin.append(client)
34
+ self._restart_locks[c.id] = asyncio.Lock() # Pre-initialize
35
36
async def init(self) -> None:
37
"""Initialize all clients in the pool."""
@@ -73,8 +74,7 @@ async def _ensure_client_ready(self, client: GeminiClientWrapper) -> bool:
73
74
75
lock = self._restart_locks.get(client.id)
76
if lock is None:
- lock = asyncio.Lock()
77
- self._restart_locks[client.id] = lock
+ return False # Should not happen
78
79
async with lock:
80
if client.running:
0 commit comments