From cf8e847ed334b5890fb67bf7a306aae3b76aebc0 Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Thu, 25 May 2023 19:22:39 +0300 Subject: [PATCH] Switch to new redis version --- apiserver/redis_manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apiserver/redis_manager.py b/apiserver/redis_manager.py index 438391f..eda7ec0 100644 --- a/apiserver/redis_manager.py +++ b/apiserver/redis_manager.py @@ -2,7 +2,7 @@ from os import getenv from boltons.iterutils import first from redis import StrictRedis -from rediscluster import RedisCluster +from redis.cluster import RedisCluster from apiserver.apierrors.errors.server_error import ConfigError, GeneralError from apiserver.config_repo import config @@ -83,7 +83,7 @@ class RedisManager(object): def host(self, alias): r = self.connection(alias) if isinstance(r, RedisCluster): - connections = first(r.connection_pool._available_connections.values()) + connections = r.get_default_node().redis_connection.connection_pool._available_connections else: connections = r.connection_pool._available_connections