Skip to content

Commit

Permalink
Merge pull request #515 from ydb-platform/custom_loop_for_session_pool
Browse files Browse the repository at this point in the history
Add an ability to pass custom event loop to QuerySessionPool
  • Loading branch information
vgvoleg authored Nov 1, 2024
2 parents ce4e31d + e0c5cab commit cb47ecc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ydb/aio/query/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def __init__(
size: int = 100,
*,
query_client_settings: Optional[QueryClientSettings] = None,
loop: Optional[asyncio.AbstractEventLoop] = None,
):
"""
:param driver: A driver instance
Expand All @@ -42,7 +43,7 @@ def __init__(
self._queue = asyncio.Queue()
self._current_size = 0
self._waiters = 0
self._loop = asyncio.get_running_loop()
self._loop = asyncio.get_running_loop() if loop is None else loop
self._query_client_settings = query_client_settings

async def _create_new_session(self):
Expand Down

0 comments on commit cb47ecc

Please sign in to comment.