Skip to content

Commit

Permalink
Update pool.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rekby authored Sep 21, 2023
1 parent c6ef4ec commit c4a8d5f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ydb/aio/pool.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import asyncio
import logging
import random
import typing

from ydb import issues
from ydb.pool import ConnectionsCache as _ConnectionsCache, IConnectionPool

from .connection import Connection
from .connection import Connection, EndpointKey

from . import resolver

Expand All @@ -21,7 +22,7 @@ def __init__(self, use_all_nodes: bool = False):

self._fast_fail_error = None

async def get(self, preferred_endpoint=None, fast_fail=False, wait_timeout=10):
async def get(self, preferred_endpoint: typing.Optional[EndpointKey] = None, fast_fail=False, wait_timeout=10):

if fast_fail:
await asyncio.wait_for(self._fast_fail_event.wait(), timeout=wait_timeout)
Expand Down

0 comments on commit c4a8d5f

Please sign in to comment.