diff --git a/src/utilities/__init__.py b/src/utilities/__init__.py index 7b584a8b2..bbd25a226 100644 --- a/src/utilities/__init__.py +++ b/src/utilities/__init__.py @@ -1,3 +1,3 @@ from __future__ import annotations -__version__ = "0.55.3" +__version__ = "0.55.4" diff --git a/src/utilities/redis.py b/src/utilities/redis.py index ebac61dd3..815d8b886 100644 --- a/src/utilities/redis.py +++ b/src/utilities/redis.py @@ -1539,7 +1539,11 @@ async def yield_client_async( try: yield client finally: - await client.aclose() + match client.connection_pool: + case redis.ConnectionPool() as pool: + pool.disconnect(inuse_connections=False) + case redis.asyncio.ConnectionPool() as pool: + await pool.disconnect(inuse_connections=False) @contextmanager