From d66ae4ae126496807b47be6cfae6e3fee123d491 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 28 Oct 2024 08:54:23 +0800 Subject: [PATCH] Fix2 the issues with #9538 Signed-off-by: root --- api/extensions/ext_redis.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/api/extensions/ext_redis.py b/api/extensions/ext_redis.py index 410ebaf4bf..1e0ad59689 100644 --- a/api/extensions/ext_redis.py +++ b/api/extensions/ext_redis.py @@ -73,11 +73,10 @@ def init_app(app): master = sentinel.master_for(dify_config.REDIS_SENTINEL_SERVICE_NAME, **redis_params) redis_client.initialize(master) elif dify_config.REDIS_USE_CLUSTERS: - startup_nodes = [ - {"host": node.split(":")[0], "port": int(node.split(":")[1])} + nodes = [ + ClusterNode(host=node.split(":")[0], port=int(node.split.split(":")[1])) for node in dify_config.REDIS_CLUSTERS.split(",") ] - nodes = [ClusterNode(host=node["host"], port=node["port"]) for node in startup_nodes] redis_client.initialize(RedisCluster(startup_nodes=nodes, password=dify_config.REDIS_CLUSTERS_PASSWORD)) else: redis_params.update(