create-reaction-fix
All checks were successful
Deploy on push / deploy (push) Successful in 6s

This commit is contained in:
2024-11-02 19:16:52 +03:00
parent 2c981bc972
commit f4a8a653d0
2 changed files with 9 additions and 12 deletions

View File

@@ -1,9 +1,8 @@
import logging
from fakeredis.aioredis import FakeRedis
from redis.asyncio import Redis
from settings import MODE, REDIS_URL
from settings import REDIS_URL
# Set redis logging level to suppress DEBUG messages
logger = logging.getLogger("redis")
@@ -17,9 +16,7 @@ class RedisService:
self._client = None
async def connect(self):
if MODE == "development":
self._client = FakeRedis(decode_responses=True)
else:
if self._uri:
self._client = await Redis.from_url(self._uri, decode_responses=True)
logger.info("Redis connection was established.")