lgos
All checks were successful
Deploy on push / deploy (push) Successful in 5s

This commit is contained in:
2024-11-02 04:44:07 +03:00
parent 8965395377
commit 9a6c995589
2 changed files with 19 additions and 10 deletions

View File

@@ -21,10 +21,12 @@ class RedisService:
self._client = FakeRedis(decode_responses=True)
else:
self._client = await Redis.from_url(self._uri, decode_responses=True)
logger.info("Redis connection was established.")
async def disconnect(self):
if self._client:
if isinstance(self._client, Redis):
await self._client.close()
logger.info("Redis connection was closed.")
async def execute(self, command, *args, **kwargs):
if self._client: