DJ Celery Panel brings Celery monitoring directly into Django Admin. No separate services to deploy, no extra infrastructure to maintain — just add it to INSTALLED_APPS and you're done.
https://yassi.github.io/dj-celery-panel/
- Workers Monitoring: View active Celery workers, their status, pool type, and concurrency
- Task Management: Browse and inspect Celery tasks with detailed information
- Queue Overview: Monitor configured queues and their routing
- Periodic Tasks: View scheduled periodic tasks and their schedules
- Real-time Inspection: Live data from Celery's inspect API
- Django Admin Integration: Seamlessly integrated into your existing Django admin interface
- Swappable Backends: Pluggable architecture for custom data sources and monitoring integrations
dj-celery-panel/
├── dj_celery_panel/ # Main package
│ ├── templates/ # Django templates
│ ├── views.py # Django views
│ └── urls.py # URL patterns
├── example_project/ # Example Django project
├── tests/ # Test suite
├── images/ # Screenshots for README
└── requirements.txt # Development dependencies
- Python 3.9+
- Django 4.2+
Django Celery Panel is built with a pluggable backend architecture that allows you to customize how data is retrieved and displayed. Each feature area (tasks, workers, queues) uses a configurable backend class, making it easy to adapt to different Celery configurations or add custom functionality.
- Flexibility: Switch between different data sources (inspect API, database, custom APIs)
- Extensibility: Implement custom backends for specialized needs
- Performance: Choose backends optimized for your infrastructure
- Future-proof: Add support for new Celery features without breaking changes
Tasks Backends:
CeleryTasksDjangoCeleryResultsBackend- Uses django-celery-results for comprehensive task history (default)- Custom: Implement your own by extending
CeleryAbstractInterface
Workers Backends:
CeleryWorkersInspectBackend- Real-time worker data via Celery's inspect API (default)- Custom: Could implement monitoring via Redis, custom metrics services, etc.
Queues Backends:
CeleryQueuesInspectBackend- Queue information via Celery's inspect API (default)- Custom: Could implement queue monitoring via broker-specific APIs
Periodic Tasks Backends:
CeleryPeriodicTasksConfigBackend- Reads from CELERY_BEAT_SCHEDULE configuration (default)CeleryPeriodicTasksDjangoCeleryBeatBackend- Reads from django-celery-beat database- Custom: Could implement schedule management via custom schedulers
class CustomTasksBackend:
"""Custom backend that fetches tasks from your own API."""
def get_tasks(self, search_query=None, page=1, per_page=50):
# Your custom implementation
# Fetch from external API, custom database, etc.
return TaskListPage(...)
def get_task_detail(self, task_id):
# Your custom implementation
return TaskDetailPage(...)
# Configure in settings.py
DJ_CELERY_PANEL_SETTINGS = {
"tasks_backend": "myapp.backends.CustomTasksBackend",
}This architecture means you're never locked into a specific implementation. As your infrastructure evolves, Django Celery Panel can evolve with it.
Seamlessly integrated into your Django admin interface. A new section for dj-celery-panel will appear in the same places where your models appear.
NOTE: This application does not actually introduce any model or migrations.
Get a quick overview of your Celery infrastructure including active workers, recent tasks, and queue status.
View all active Celery workers with detailed information about their status, pool type, concurrency, and processing capabilities.
Browse and inspect your Celery tasks with complete details including status, arguments, results, and execution time.
View your Celery configuration including broker settings, result backend, and other runtime parameters.
pip install dj-celery-panelAdd dj_celery_panel to your INSTALLED_APPS:
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'dj_celery_panel', # Add this line
# ... your other apps
]Django Celery Panel works with your existing Celery configuration. Ensure you have Celery properly configured:
# Celery Configuration
CELERY_BROKER_URL = 'redis://localhost:6379/0' # or your broker URL
CELERY_RESULT_BACKEND = 'django-db' # or your preferred backend
# Optional: Advanced configuration
DJ_CELERY_PANEL_SETTINGS = {
# Backend classes for each interface
"tasks_backend": "dj_celery_panel.celery_utils.CeleryTasksDjangoCeleryResultsBackend",
"workers_backend": "dj_celery_panel.celery_utils.CeleryWorkersInspectBackend",
"queues_backend": "dj_celery_panel.celery_utils.CeleryQueuesInspectBackend",
}Note: The panel requires at least one Celery worker to be running to display worker and queue information.
Add the Celery Panel URLs to your main urls.py:
from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('admin/dj-celery-panel/', include('dj_celery_panel.urls')), # Add this line
path('admin/', admin.site.urls),
]python manage.py migrate
python manage.py createsuperuser # If you don't have an admin userStart at least one Celery worker for the panel to monitor:
celery -A your_project worker --loglevel=info-
Start your Django development server:
python manage.py runserver
-
Navigate to the Django admin at
http://127.0.0.1:8000/admin/ -
Look for the "DJ_CELERY_PANEL" section in the admin interface
-
Click to browse workers, tasks, queues, and periodic tasks
This project is licensed under the MIT License. See the LICENSE file for details.
If you want to contribute to this project or set it up for local development:
- Python 3.9 or higher
- Redis server (for Celery broker)
- PostgreSQL (optional, can use SQLite)
- Git
- Docker (recommended)
Docker is recommended since it automates the setup of all required services including Redis, PostgreSQL, and Celery workers.
git clone https://github.com/yassi/dj-celery-panel.git
cd dj-celery-panelpython -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -e . # install dj-celery-panel package locally
pip intall -r requirements.txt # install all dev requirements
# Alternatively
make install # this will also do the above in one single commandmake docker_up # Bring up all services (Redis, PostgreSQL, Celery workers)
make docker_shell # Open a shell in the docker containerThe repository includes an example Django project for development and testing
cd example_project
python manage.py migrate
python manage.py createsuperuserFor development, start at least one Celery worker:
cd example_project
celery -A example_project worker --loglevel=infopython manage.py runserverVisit http://127.0.0.1:8000/admin/ to access the Django admin with Celery Panel.
The test suite requires running services (Redis, PostgreSQL, and at least one Celery worker) to test the monitoring functionality.
Docker automatically starts all required services:
make test_dockerFor local testing, ensure services are running:
# Terminal 1: Start Redis
docker run -d -p 6379:6379 redis:7
# Terminal 2: Start PostgreSQL (optional, can use SQLite)
docker run -d -p 5432:5432 -e POSTGRES_PASSWORD=postgres postgres:16
# Terminal 3: Start Celery worker
cd example_project
python manage.py migrate
celery -A example_project worker --loglevel=info
# Terminal 4: Run tests
pytest tests/ -vThe CI pipeline automatically:
- Starts Redis and PostgreSQL services
- Runs database migrations
- Starts a Celery worker in detached mode
- Executes the full test suite with coverage reporting





