Skip to main content

Celery tracker for Django.

Project description

Build status

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.

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.1.0.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

django_celery_tracker-2.1.0-py2.py3-none-any.whl (14.9 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: django_celery_tracker-2.1.0.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for django_celery_tracker-2.1.0.tar.gz
Algorithm Hash digest
SHA256 01f823f146ef3304601c301e5a08c01b4ddbdb9223c2414a38e950dbf0d22722
MD5 58b745f0afe094f190ae4ce1e1c90c2b
BLAKE2b-256 b4253aa257ea9e41a8d2ac896917173118e30182ed9b8fbbb63105ff6853cb67

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_celery_tracker-2.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 81451841b917b203f14c34ac68f933a49659fef431bfd2a2e6f20153621a181e
MD5 31fa518ae854e241e32818001a37021d
BLAKE2b-256 c0803c232d055edee40e239fb6b0eaa7b354af96d0dfb7e84901646937673799

See more details on using hashes here.

Supported by

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