Skip to main content

Celery tracker for Django.

Project description

Build status coverage

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:

  1. Install django-celery-tracker:

$ pip install django-celery-tracker
  1. Add django_celery_tracker to INSTALLED_APPS in your Django settings file:

INSTALLED_APPS = (
    ...
    'django_celery_tracker',
)
  1. Create the database tables by applying migrations:

$ python manage.py migrate django_celery_tracker
  1. 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

django_celery_tracker-2.0.0.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

django_celery_tracker-2.0.0-py2.py3-none-any.whl (14.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django_celery_tracker-2.0.0.tar.gz.

File metadata

  • Download URL: django_celery_tracker-2.0.0.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for django_celery_tracker-2.0.0.tar.gz
Algorithm Hash digest
SHA256 a96f9e6c765f0822b036bba0bed7551fa8f1412c98d7105e2fa8af9db1289074
MD5 ad603b7a0db499f7b3d1a8fb0f93bf7c
BLAKE2b-256 d2c3eb5b25aa221e53d98a7f4e77a67872fef3aca6a99b7d31e6bf251d109438

See more details on using hashes here.

Provenance

File details

Details for the file django_celery_tracker-2.0.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_celery_tracker-2.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 37f75b7d98e36646663a3665d757578e76ea32e668eec65e062f2d1c04f7ca70
MD5 5ecfd4d99eba1fe9f45173a336b13632
BLAKE2b-256 10fa386ce3e389ab21aed0e69bde3bd3d8f0f10313ad3bc63ad06a94710a1995

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page