CLI tool to inspect and purge Celery Redis queues
Project description
Celery Queue Manager
A powerful, interactive CLI tool to inspect, monitor, and clean up Celery queues backed by Redis.
Designed for developers and DevOps engineers who need to "deep scan" Redis databases, inspect task payloads, and selectively delete tasks without direct access to workers or application code.
✨ Features
- Deep Scan: Automatically scans all Redis databases (0-15) to discover hidden Celery queues.
- Payload Inspection: Decode and view the JSON content (args, task names, IDs) of queued items.
- Selective Delete: Remove specific tasks based on wildcards (e.g., delete only
*.send_emailtasks). - Total Purge: Quickly empty an entire queue to reset the state.
- Safe: Includes confirmation prompts before deleting any data.
- Zero Dependencies: (On the server side) - Just requires Python and access to Redis.
📦 Installation
You can install this tool directly via pip.
Option 1: Install from Git (Recommended for Teams)
If this repository is hosted on GitHub/GitLab:
pip install git+https://github.com/mbroekman/celery-queue-manager.git
Option 2: Install Locally (For Development)
Clone this folder and run:
pip install .
Option 3: Install from PyPI (If published)
pip install celery-queue-manager
⚙️ Configuration
By default, the tool connects to redis://localhost:6379.
To connect to a different Redis server (e.g., in Docker or Production), set the CELERY_REDIS_URL environment variable before running the tool.
Linux/Mac:
export CELERY_REDIS_URL="redis://user:password@192.168.1.50:6379/0"
Windows (PowerShell):
$env:CELERY_REDIS_URL="redis://user:password@192.168.1.50:6379/0"
🚀 Usage
After installation, the command celery-manager is available globally in your terminal.
celery-manager
Interactive Menu
The tool will scan your Redis instance and present a menu:
--- Found Queues ---
1. [DB 0] celery (Items: 42)
2. [DB 1] high_priority (Items: 1500)
Options:
Type the queue NUMBER to select it.
Type 'q' to quit.
Actions
Once a queue is selected, you can:
- INSPECT CONTENT: Peeks at the top 5 tasks (shows Task Name, ID, and Args).
- PURGE ENTIRE QUEUE: Removes ALL items from the list.
- DELETE SPECIFIC TASKS: Prompts for a wildcard pattern (e.g.,
*invoice*) and removes only matching tasks.
🛠 Development
To build this package yourself (e.g., to create a .whl file):
- Install build tools:
pip install build
- Build the package:
python -m build
- The artifacts will appear in the
dist/directory.
👨💻 Creator
Created by: [Jouw Naam]
- Email: m.broekman@ises-softpack.nl
- GitHub: https://github.com/mbroekman
📄 License
This project is licensed under the MIT License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file celery_queue_manager-1.0.2.tar.gz.
File metadata
- Download URL: celery_queue_manager-1.0.2.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2cbe1e7a01058ee013f09b32d1375ae68934605c217f99bf75d4256d7844baf5
|
|
| MD5 |
b93f77f157de4d2d43918eca137325a8
|
|
| BLAKE2b-256 |
2cc126e4aef79eab38a94fe68954992cae111217a9a601200e6cf55aefa8fd55
|
File details
Details for the file celery_queue_manager-1.0.2-py3-none-any.whl.
File metadata
- Download URL: celery_queue_manager-1.0.2-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
feb95eb054d9f0bf36851f4d82374b0c2b8d1a0fef6cd36a343ee169bcd13f0b
|
|
| MD5 |
8a6f4b6b39f5d6ad01403f2454ccb924
|
|
| BLAKE2b-256 |
9946c9dc71a5097909a61c47077906a7c0673455a4371fe8f6b2399a56a8c6c5
|