Merge pull request 'fix' (#14) from master into dev

Reviewed-on: #14
This commit is contained in:
emmatveev 2024-11-25 00:49:57 +03:00
commit 79e5151dd0

View File

@ -4,12 +4,6 @@ import redis.asyncio as connection
REDIS_HOST = os.getenv('REDIS_HOST', 'localhost')
REDIS_PASSWORD = os.getenv('REDIS_PASSWORD')
if REDIS_PASSWORD:
URL = f'redis://:{REDIS_PASSWORD}@{REDIS_HOST}:6379'
else:
URL = f'redis://{REDIS_HOST}:6379'
pool = connection.from_url(URL)
database = connection.Redis.from_pool(pool)
database = connection.Redis(host=REDIS_HOST, password=REDIS_PASSWORD)