From 641690e3f7c1ecabab491a9a93d20bbfee6c63dd Mon Sep 17 00:00:00 2001 From: rkuo-danswer Date: Thu, 12 Sep 2024 12:18:04 -0700 Subject: [PATCH] fix enabling ssl in connection pool (#2418) --- backend/danswer/redis/redis_pool.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/danswer/redis/redis_pool.py b/backend/danswer/redis/redis_pool.py index a0751ab6a8..1ca2e07ecd 100644 --- a/backend/danswer/redis/redis_pool.py +++ b/backend/danswer/redis/redis_pool.py @@ -31,13 +31,14 @@ class RedisPool: def _init_pool(self) -> None: if REDIS_SSL: + # Examples: https://github.com/redis/redis-py/issues/780 self._pool = redis.ConnectionPool( host=REDIS_HOST, port=REDIS_PORT, db=REDIS_DB_NUMBER, password=REDIS_PASSWORD, max_connections=REDIS_POOL_MAX_CONNECTIONS, - ssl=True, + connection_class=redis.SSLConnection, ssl_ca_certs=REDIS_SSL_CA_CERTS, ssl_cert_reqs=REDIS_SSL_CERT_REQS, )