mirror of
https://github.com/open-webui/open-webui.git
synced 2026-12-02 17:57:57 -05:00
fix: every chat message fails on a Redis Cluster deployment (#33766)
With REDIS_CLUSTER enabled, every chat message failed with an error. The Redis connection recently added for terminal connections was used before it had read the cluster's layout. That connection now reads the layout first, so chats work again on a Redis Cluster. Plain Redis and Sentinel setups behave as before. Fixes #33765
This commit is contained in:
1 parent
393dd6689c
commit
5beeb0cc29
1 file changed
+2
@@ -219,6 +219,8 @@ class Hub:
|
||||
async_mode=True,
|
||||
decode_responses=False,
|
||||
)
|
||||
# RedisCluster can't route a pubsub subscribe until initialize() fills its slot cache.
|
||||
await self.redis.initialize()
|
||||
pubsub = self.redis.pubsub()
|
||||
await pubsub.subscribe(self.channel(self.worker))
|
||||
self.listener = asyncio.create_task(self.listen(pubsub))
|
||||
|
||||
Reference in new issue
Block a user