diff --git a/service/redis_pool.py b/service/redis_pool.py index 0e586709..e551075e 100644 --- a/service/redis_pool.py +++ b/service/redis_pool.py @@ -6,6 +6,8 @@ redis_db = settings.REDIS_DB redis_port = settings.REDIS_PORT redis_password = settings.REDIS_PASSWORD - -POOL = redis.ConnectionPool(host=redis_host, port=redis_port, password=redis_password, max_connections=1000) +if redis_password: + POOL = redis.ConnectionPool(host=redis_host, port=redis_port, password=redis_password, max_connections=1000) +else: + POOL = redis.ConnectionPool(host=redis_host, port=redis_port, max_connections=1000)