Celery tracker for Django.
Project description
This django extension is intended for existing celery projects that want better monitoring of what’s going on in their queue.
Usage
To use this with your project, you need to:
Install django-celery-tracker:
$ pip install django-celery-tracker
Add django_celery_tracker to INSTALLED_APPS in your Django settings file:
INSTALLED_APPS = (
...
'django_celery_tracker',
)
Create the database tables by applying migrations:
$ python manage.py migrate django_celery_tracker
You will now have a record of all future celery tasks and their progress which can be queried like so:
$ python manage.py console
...
>>> from django_celery_tracker.models import CeleryTask
>>> CeleryTask.objects.all()
<QuerySet [<CeleryTask: id=3d889396-daa2-4209-9348-9ec71bfb1262, name=api.taskapp.celery.debug_task>]
Dashboard
Optionally, you can include a dashboard view that can only be accessed by admin users. To add the dashboard to your project, simply add the following to your urls.py:
urlpatterns = [
path("celery-tracker/", include("django_celery_tracker.urls")),
]
You can now visit http://site_url/celery-tracker to view the status of your tasks!
Disclaimer
The datastore for a celery message queue is usually in-memory and highly-optimized (eg redis or rabbitmq). This django extension creates a database entry for every celery task that is created. You may want to periodically delete older entries if storage is an obstacle.
Release
switch to master branch:
Change package version in django_celery_tracker/__init__.py according to release changes (major|minor|patch).
Update CHANGELOG.md: - Rename [Unreleased] section to reflect new release version and release date, same format as for all previous releases - Create new [Unreleased] section on top of file, as it was previously - On the bottom of CHANGELOG.md file, create comparison reference for current release changes:
# was
[Unreleased]: https://github.com/chris-allen/django-celery-tracker/compare/v0.3.0...HEAD
[0.3.0]: https://github.com/chris-allen/django-celery-tracker/compare/v0.2.0...v0.3.0
# became
# - "Unreleased" renamed to commit version
# - new "Unreleased" created, comparing last "0.4.0" commit with "HEAD"
[Unreleased]: https://github.com/chris-allen/django-celery-tracker/compare/v0.4.0...HEAD
[0.4.0]: https://github.com/chris-allen/django-celery-tracker/compare/v0.3.0...v0.4.0
[0.3.0]: https://github.com/chris-allen/django-celery-tracker/compare/v0.2.0...v0.3.0
Commit CHANGELOG.md and django_celery_tracker/__init__.py with message :rocket: {version} (where version is your release version)
Project details
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
Hashes for django_celery_tracker-1.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | dde7f5871c08625b2afcac5c589e87666f8716fe8433ac82c24336bf6aa81c01 |
|
MD5 | 3e2dc3f35e3155b263ad55725f66ae7d |
|
BLAKE2b-256 | 79d88bb7d0e50943fe7464b7946211f9d2bef01c628ead9635144889901323e6 |
Hashes for django_celery_tracker-1.3.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78509798aa42cd269f21ea02fcb5a6a1b8ce62aad8f6e9ce6e7ebba9ec918b9c |
|
MD5 | 0244409115a966200418f94843970129 |
|
BLAKE2b-256 | cd5e3234615865ad9404b019ba6aff1f4fc09578cded60790d801d537b5b2dd1 |