A UI centric tool for visualising Celery task execution.
celeryviz_demo.mov
This project simplifies debugging of asynchronous Celery tasks by offering a visual representation of the task execution flow. Instead of combing through the log files, developers can use Celeryviz to visually trace and debug task processes more efficiently.
- Python library
pip install celeryviz- Docker image
docker pull bhavyatech/celeryviz:0.0.3- To test the example, you can use the provided Docker Compose setup. This will set up a Redis server, a Celery worker, and the CeleryViz server.
cd example
docker-compose up --build(This may take a few minutes to build the first time.)
- Use this gist for a minimal example.
curl https://gist.githubusercontent.com/bhavya-tech/d937ef45905720014ee12fe332352966/raw/0afac784adfb6b407fa83ce4b19e6f3cab4d80d9/example_app.py -o example_app.py-
Ensure a message broker is running (can use RabbitMQ for simplicity)
-
Schedule a task for celery to run:
celery -A example_app call example_app.add --args='[1, 100]' --kwargs='{"z":10000}'- Run the celery worker.
celery -A example_app worker -l info -EThere are two ways to run celeryviz:
- Pass the broker url
docker run -p 9095:9095 bhavyatech/celeryviz:0.0.3 celery --broker='<broker_url>' celeryviz- Use the configuration of celery application.
docker run -p 9095:9095 -v $PWD:/app bhavyatech/celeryviz:0.0.3 celery -A example_app.app celeryviz- In a new terminal, run the following command:
celery -A example_app celeryviz- Open your browser and go to http://localhost:9095/app/
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at bhavyapeshavaria@gmail.com. All complaints will be reviewed and investigated promptly and fairly.