Skip to main content

Python Django License PyPI Build Status Coverage Status Downloads

Django-Celery-GrowthMonitor

A Django helper to monitor jobs running Celery tasks

Features

  • Utilities to track progress of Celery tasks via in-database jobs

  • Designed for jobs with user-uploaded files

Requirements

Installation

Using PyPI

  1. Run pip install django-celery-growthmonitor

Using the source code

  1. Make sure pandoc is installed

  2. Run ./pypi_packager.sh

  3. Run pip install dist/django_celery_growthmonitor-x.y.z-[...].wheel, where x.y.z must be replaced by the actual version number and [...] depends on your packaging configuration

Usage

('state', echoices.fields.make_echoicefield(default=celery_growthmonitor.models.AJob.EState.CREATED, echoices=celery_growthmonitor.models.AJob.EState, editable=False)),
('status', echoices.fields.make_echoicefield(default=celery_growthmonitor.models.AJob.EStatus.ACTIVE, echoices=celery_growthmonitor.models.AJob.EStatus, editable=False)),
from .celery import app

@app.task
def my_task(holder: JobHolder, *args):
    job = holder.get_job()
    if job.has_failed():
        # Just skip the whole if the previous task failed
        return holder.pre_serialization()
    # Some processing
    ...
    job.save()
    return holder.pre_serialization()

Helpers

Automatically set the job failed on task failure using custom base Task class

from celery_growthmonitor.models.task import JobFailedOnFailureTask

@app.task(base=JobFailedOnFailureTask, bind=True)
def my_task(self, holder: JobHolder):
    pass

Admin

from django.contrib import admin

from celery_growthmonitor.admin import AJobAdmin

@admin.register(MyJob)
class MyJobAdmin(AJobAdmin):
    fields = AJobAdmin.fields + ('my_extra_field',)
    readonly_fields = AJobAdmin.readonly_fields + ('my_extra_field',)

Metadata

Release files for django-celery-growthmonitor 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-celery-growthmonitor 1.0.1
File Size Uploaded Provenance Actions
django-celery-growthmonitor-1.0.1.tar.gz 25.7 kB Without provenance Details for django-celery-growthmonitor-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-celery-growthmonitor 1.0.1
File Interpreter ABI Platform Actions
django_celery_growthmonitor-1.0.1-py3-none-any.whl Python 3 none any Details for django_celery_growthmonitor-1.0.1-py3-none-any.whl

Total release size: 51.5 kB

Release files / django-celery-growthmonitor-1.0.1.tar.gz

Download URL django-celery-growthmonitor-1.0.1.tar.gz
Size 25.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f8130cbea1b70ba8f0083b4022ca6c839853d8ff17b81b458bf202ca15316aef
BLAKE2b-256 checksum
How to use checksums
84d5549582b07e88d048afed6f84738f01bcf7dea06bd62445f36ab93dcefc82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.9

Release files / django_celery_growthmonitor-1.0.1-py3-none-any.whl

Download URL django_celery_growthmonitor-1.0.1-py3-none-any.whl
Size 25.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1513e36874bdb7ddd92b50f7c1eda11976e3a1279473607911b2ac3454e482fd
BLAKE2b-256 checksum
How to use checksums
faf0c7ac885f9aa3f9368b06e102c6be0c72640d766e7b0cde62436be1acc022
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.9

Security for django-celery-growthmonitor 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page