mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-14 09:21:22 +00: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:
parent
393dd6689c
commit
5beeb0cc29
1 changed files with 2 additions and 0 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue