Enables proper task cancellation in multi-node deployments using Redis Cluster
Affects horizontal scalability scenarios with Redis Cluster backend
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.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/20752
**Author:** [@YuriNachos](https://github.com/YuriNachos)
**Created:** 1/17/2026
**Status:** ❌ Closed
**Base:** `dev` ← **Head:** `fix-19840-rediscluster-pubsub`
---
### 📝 Commits (1)
- [`2579747`](https://github.com/open-webui/open-webui/commit/25797470e6b52acc6fd87e6195a4ae4efcd37752) fix: Support RedisCluster for task command pub/sub messaging
### 📊 Changes
**1 file changed** (+19 additions, -1 deletions)
<details>
<summary>View changed files</summary>
📝 `backend/open_webui/tasks.py` (+19 -1)
</details>
### 📄 Description
### Description
- Fixes #19840 - RedisCluster publish fails on POST /api/tasks/stop/{task_id}
### Added
- N/A
### Changed
- Added RedisCluster support in `redis_send_command()` function
### Deprecated
- N/A
### Removed
- N/A
### Fixed
- **RedisCluster pub/sub**: Fixed AttributeError when using Redis Cluster for task commands
- Previously, `redis.publish()` method doesn't exist on RedisCluster objects
- Now the code:
1. Checks if redis object is a RedisCluster instance
2. For RedisCluster: iterates through all master nodes and publishes to each
3. For standard Redis: uses publish() normally
- This ensures task stop commands reach all worker nodes in cluster deployments
### Security
- N/A
### Breaking Changes
- N/A
---
### Additional Information
- Issue: #19840
- Enables proper task cancellation in multi-node deployments using Redis Cluster
- Affects horizontal scalability scenarios with Redis Cluster backend
### Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/20752
Author: @YuriNachos
Created: 1/17/2026
Status: ❌ Closed
Base:
dev← Head:fix-19840-rediscluster-pubsub📝 Commits (1)
2579747fix: Support RedisCluster for task command pub/sub messaging📊 Changes
1 file changed (+19 additions, -1 deletions)
View changed files
📝
backend/open_webui/tasks.py(+19 -1)📄 Description
Description
Added
Changed
redis_send_command()functionDeprecated
Removed
Fixed
redis.publish()method doesn't exist on RedisCluster objectsSecurity
Breaking Changes
Additional Information
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.