Celery Flower

2.0.1 · active · verified Thu Apr 09

Flower is a real-time web-based monitor and administration tool for Celery distributed task queues. It provides a visual dashboard for task progress and history, worker status, remote control capabilities (e.g., shutdown workers, control pool size), and an HTTP API. It is actively developed and is the recommended monitoring solution for Celery clusters.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates setting up a basic Celery application and then launching Flower to monitor it. Ensure a message broker (like Redis or RabbitMQ) is running and accessible at the specified URL. Flower runs as a separate process and is accessed via a web browser.

import os
from celery import Celery

# 1. Set up a simple Celery app
app = Celery(
    'my_app',
    broker=os.environ.get('CELERY_BROKER_URL', 'redis://localhost:6379/0'),
    backend=os.environ.get('CELERY_BACKEND_URL', 'redis://localhost:6379/0')
)

@app.task
def add(x, y):
    return x + y

# To run Celery worker (in a separate terminal):
# celery -A my_app worker --loglevel=info

# To run Flower (in another separate terminal):
# celery -A my_app flower --port=5555
# Or, if not using an app instance directly:
# celery --broker=redis://localhost:6379/0 flower --port=5555

# Then open http://localhost:5555 in your browser.

view raw JSON →