mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[PR #20246] [CLOSED] fix: use sharded pub/sub for Redis Cluster task commands #48567
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/20246
Author: @Classic298
Created: 12/29/2025
Status: ❌ Closed
Base:
dev← Head:redis📝 Commits (2)
5f96004Update tasks.py17bdfa8Update tasks.py📊 Changes
1 file changed (+41 additions, -1 deletions)
View changed files
📝
backend/open_webui/tasks.py(+41 -1)📄 Description
Summary
Fixes task stop commands not working when using Redis Cluster mode.
Problem
When Open WebUI is configured with Redis Cluster (
REDIS_CLUSTER=true), the task stop endpoint fails because:RedisClusterobject doesn't have a directpublishmethodexecute_command('PUBLISH', ...)doesn't work because standard Redis PUBLISH is node-local in cluster mode — messages only reach subscribers connected to that specific nodeSolution
Implement sharded pub/sub (
SPUBLISH/SSUBSCRIBE) for Redis Cluster mode:nodes_managerattributeSPUBLISHfor cluster,publishfor standardssubscribefor cluster,subscribefor standard"smessage"vs"message")Sharded pub/sub properly routes messages across all cluster nodes based on channel hash slot, ensuring all worker nodes receive task commands.
Related
Fixes #19840
Testing
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.