feat: socket redis

This commit is contained in:
2024-10-22 08:55:24 +03:00
parent 7daf029a1d
commit 52b3f6e6ee
2 changed files with 2 additions and 1 deletions

View File

@@ -14,6 +14,7 @@ PG_DATABASE = os.environ.get('PG_DATABASE')
# Celery # Celery
CELERY_BROKER_URL = os.environ.get('CELERY_BROKER_URL') CELERY_BROKER_URL = os.environ.get('CELERY_BROKER_URL')
CELERY_RESULT_BACKEND = os.environ.get('CELERY_RESULT_BACKEND') CELERY_RESULT_BACKEND = os.environ.get('CELERY_RESULT_BACKEND')
REDIS_URL = os.environ.get('REDIS_URL')
# Yandex # Yandex
YANDEX_CLIENT_ID = os.environ.get('YANDEX_CLIENT_ID') YANDEX_CLIENT_ID = os.environ.get('YANDEX_CLIENT_ID')

View File

@@ -15,7 +15,7 @@ class RedisConnectionManager:
async def get_redis_connection(cls): async def get_redis_connection(cls):
async with cls._redis_lock: async with cls._redis_lock:
if cls._redis_connection is None: if cls._redis_connection is None:
cls._redis_connection = await aioredis.from_url(backend.config.CELERY_BROKER_URL) cls._redis_connection = await aioredis.from_url(backend.config.REDIS_URL)
return cls._redis_connection return cls._redis_connection