mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 03:32:23 +08:00
Fix2 the issues with #9538
Signed-off-by: root <root@localhost.localdomain>
This commit is contained in:
parent
198f2be1a5
commit
d66ae4ae12
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue
Block a user