Skip to content

Commit d027c57

Browse files
committed
made get_connection_pool sync, changed a type hint
1 parent 1eeb0c6 commit d027c57

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

django_valkey/async_cache/pool.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class AsyncConnectionFactory(BaseConnectionFactory[AValkey, ConnectionPool]):
1616
path_pool_cls = "valkey.asyncio.connection.ConnectionPool"
1717
path_base_cls = "valkey.asyncio.client.Valkey"
1818

19-
async def disconnect(self, connection: type[AValkey] | type) -> None:
19+
async def disconnect(self, connection: type[AValkey]) -> None:
2020
await connection.connection_pool.disconnect()
2121

2222
def get_parser_cls(self) -> type[DefaultParser] | type:
@@ -57,11 +57,11 @@ def __init__(self, options: dict):
5757
**connection_kwargs,
5858
)
5959

60-
async def get_connection_pool(self, params: dict) -> ConnectionPool | Any:
60+
def get_connection_pool(self, params: dict) -> ConnectionPool | Any:
6161
url = urlparse(params["url"])
6262
cp_params = params
6363
cp_params.update(service_name=url.hostname, sentinel_manager=self._sentinel)
64-
pool = await super().get_connection_pool(cp_params)
64+
pool = super().get_connection_pool(cp_params)
6565

6666
is_master = parse_qs(url.query).get("is_master")
6767
if is_master:

0 commit comments

Comments
 (0)