Celery Flower to monitor task queue

Reading Time : ~ .

Celery is a task queue that is to built an asynchronous message passing system. It can be used as a bucket where programming tasks can be dumped. The program that passed the task can continue to execute and function responsively.

To monitor the status of these celery tasks we use celery flower

The Celery Flower is a tool for monitoring your celery tasks and workers. It's web based and allows you to see task progress, details, worker status.

Install flower with pip

pip install flower

Install RabbitMQ

Celery requires a messaging agent in order to handle requests from an external source. This agent is referred to as a "broker".

RabbitMQ is the messaging server which powers this service. RabbitMQ does the following:

  • Listens for messages sent via the AMQP protocol.
  • Stores these messages in one or more queues.
  • Releases these messages to workers for consumption and processing.

RabbitMQ does not actually execute tasks. Rather, it is the mechanism by which tasks (“messages”) will be sent between instances and stored until executed.

Install rabbitmq using

sudo apt-get install rabbitmq-server

 

Add broker_api url in your settings.py

RabbitMQ management api

broker_api = 'http://guest:guest@localhost:15672/api/'

# Enable debug logging

logging = 'DEBUG'

We need to configure RabbitMQ for message broker services before running the celery. Once the RabbitMQ is successfully started it can be checked using the web UI located at:

http://localhost:15672/

Usage

Once the Celery Flower is successfully started you can check using the web UI located at:

http://localhost:5555

Launch the server

$ flower --port=5555

Launch from celery

$ celery flower -A proj --address=127.0.0.1 --port=5555
    By Posted On
SENIOR DEVELOPER at MICROPYRAMID

Need any Help in your Project?Let's Talk

Latest Comments
Related Articles
Best Practices of Using Django Celery in Django Social Auth Sandeep Jagata

Best Practices of Using Django Celery in Django Social Auth.

Continue Reading...
Django - Database access optimization Anjaneyulu Batta

Django - Database access optimization, Django Queryset is generally lazy in nature. It will not hit the database until it evaluates the query results.

Continue Reading...
Set Up Travis CI For Django project Ravi Kumar Gadila

Travis CI is a continuous integration service used to build and test applications hosted at GitHub. Here are simple steps to add CI to you ...

Continue Reading...

Subscribe To our news letter

Subscribe to our news letter to receive latest blog posts into your inbox. Please fill your email address in the below form.
*We don't provide your email contact details to any third parties