A tool for visualising execution of Celery tasks.
Project description
CeleryViz
A tool for visualising execution of Celery tasks.
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.
Installation
pip install celeryviz
Usage
1. Create a celery project.
- Use this gist for a minimal example.
curl https://gist.githubusercontent.com/bhavya-tech/d937ef45905720014ee12fe332352966/raw/0afac784adfb6b407fa83ce4b19e6f3cab4d80d9/example_app.py -o example_app.py
2. Start the celery worker:
- Ensure a message broker is running (can use RabbitMQ for simplicity)
celery -A example_app worker
3. Start the CeleryViz server:
celery -A example_app celeryviz
-
Open your browser and go to http://0.0.0.0:9095/app/
-
The
attach_log_sender
in the example gist sends logs to CeleryViz.- If a custom logger does not support handlers, then monkeypatch the logger to mimic the
attach_log_sender
function.
- If a custom logger does not support handlers, then monkeypatch the logger to mimic the
Contributing
Setting up the development environment
1. Clone this repository.
git clone https://github.com/bhavya-tech/celeryviz.git
2. Build the webapp
-
The UI webapp is maintained separately in celeryviz_with_lib.
-
Run the following command to build the latest version of standard webapp locally (ensure that docker is installed):
docker build --output ./celeryviz/static ./build_ui
For customised builds, the following optional build args can be used:
GITHUB_PAT
- If any of dependency repo is private, add a github personal access token as a build argument.
GIT_REPO
- The URL of the repository to build.
- Defaults to bhavya-tech/celeryviz_with_lib
SOURCE
- The branch of the repository to build. Default is
main
. - A particular commit hash can also be used.
- The branch of the repository to build. Default is
docker build --output ./celeryviz/static --build-arg="GITHUB_PAT=<your github personal access token>" ./build_ui
3. Install the package in editable mode:
pip install -e .
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file celeryviz-0.0.1.tar.gz
.
File metadata
- Download URL: celeryviz-0.0.1.tar.gz
- Upload date:
- Size: 1.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fdb040fb1fd66d03b0c87049b752aee74de57d6ba2632beca6b1fe8d5a80417 |
|
MD5 | 02fe680a95a75b9082bf18dac1716663 |
|
BLAKE2b-256 | f4e8728cabf978648afae6b98ed1b90c29770267d2fe8713371513d78fe04c3d |
File details
Details for the file celeryviz-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: celeryviz-0.0.1-py3-none-any.whl
- Upload date:
- Size: 637.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6618990b37a97bd22f7a1c32cbad22dfc5cdca5f711e3f13d76164d9d8d913d2 |
|
MD5 | 9e4b52c8bb28fa078d4f8b4fe4fa35aa |
|
BLAKE2b-256 | 8e12642c9778cb131e5922ed6715c12d3766f7741a6bcab89d060bcd652c571c |