{"id":22308504,"url":"https://github.com/mbourqui/django-celery-growthmonitor","last_synced_at":"2025-07-29T06:30:40.813Z","repository":{"id":22504566,"uuid":"96214181","full_name":"mbourqui/django-celery-growthmonitor","owner":"mbourqui","description":"Helper to monitor jobs running Celery tasks in Django","archived":false,"fork":false,"pushed_at":"2022-03-08T20:35:45.000Z","size":178,"stargazers_count":4,"open_issues_count":6,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-07T17:07:22.994Z","etag":null,"topics":["celery","celery-tasks","django","python","utility"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mbourqui.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-04T12:10:19.000Z","updated_at":"2022-10-30T10:13:01.000Z","dependencies_parsed_at":"2022-07-26T03:02:07.777Z","dependency_job_id":null,"html_url":"https://github.com/mbourqui/django-celery-growthmonitor","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mbourqui/django-celery-growthmonitor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbourqui%2Fdjango-celery-growthmonitor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbourqui%2Fdjango-celery-growthmonitor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbourqui%2Fdjango-celery-growthmonitor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbourqui%2Fdjango-celery-growthmonitor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbourqui","download_url":"https://codeload.github.com/mbourqui/django-celery-growthmonitor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbourqui%2Fdjango-celery-growthmonitor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267639569,"owners_count":24119780,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["celery","celery-tasks","django","python","utility"],"created_at":"2024-12-03T20:14:12.795Z","updated_at":"2025-07-29T06:30:40.535Z","avatar_url":"https://github.com/mbourqui.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Python](https://img.shields.io/badge/Python-3.5,3.6,3.7,3.8,3.9-blue.svg?style=flat-square)](/)\n[![Django](https://img.shields.io/badge/Django-2.2,3.2-blue.svg?style=flat-square)](/)\n[![License](https://img.shields.io/badge/License-GPLv3-blue.svg?style=flat-square)](/LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/django_celery_growthmonitor.svg?style=flat-square)](https://pypi.org/project/django-celery-growthmonitor)\n[![Build Status](https://travis-ci.org/mbourqui/django-celery-growthmonitor.svg?branch=master)](https://travis-ci.org/mbourqui/django-celery-growthmonitor)\n[![Coverage Status](https://coveralls.io/repos/github/mbourqui/django-celery-growthmonitor/badge.svg?branch=master)](https://coveralls.io/github/mbourqui/django-celery-growthmonitor?branch=master)\n[![Downloads](https://pepy.tech/badge/django-celery-growthmonitor)](https://pepy.tech/project/django-celery-growthmonitor)\n\u003ca href=\"https://github.com/psf/black\"\u003e\u003cimg alt=\"Code style: black\" src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"\u003e\u003c/a\u003e\n\n\n# Django-Celery-GrowthMonitor\n\nA Django helper to monitor jobs running Celery tasks\n\n\n## Features\n\n* Utilities to track progress of Celery tasks via in-database jobs\n* Designed for jobs with user-uploaded files\n\n\n## Requirements\n\n* [Python][] \u003e= 3.5\n* [Django][] \u003e= 2.2\n* [Celery][] \u003e= 4.0.2\n* [echoices][] \u003e= 2.6.0\n* [autoslug][] \u003e= 1.9.7\n\n\n## Installation\n\n### Using PyPI\n1. Run `pip install django-celery-growthmonitor`\n\n### Using the source code\n1. Make sure [pandoc][] is installed\n1. Run `./pypi_packager.sh`\n1. Run `pip install dist/django_celery_growthmonitor-x.y.z-[...].wheel`, where `x.y.z` must be replaced by the actual\n   version number and `[...]` depends on your packaging configuration\n\n\n## Usage\n\n```Django\n('state', echoices.fields.make_echoicefield(default=celery_growthmonitor.models.AJob.EState.CREATED, echoices=celery_growthmonitor.models.AJob.EState, editable=False)),\n('status', echoices.fields.make_echoicefield(default=celery_growthmonitor.models.AJob.EStatus.ACTIVE, echoices=celery_growthmonitor.models.AJob.EStatus, editable=False)),\n```\n\n```Django\nfrom .celery import app\n\n@app.task\ndef my_task(holder: JobHolder, *args):\n    job = holder.get_job()\n    if job.has_failed():\n        # Just skip the whole if the previous task failed\n        return holder.pre_serialization()\n    # Some processing\n    ...\n    job.save()\n    return holder.pre_serialization()\n```\n\n### Helpers\n\nAutomatically set the job failed on task failure using custom base Task class\n```Django\nfrom celery_growthmonitor.models.task import JobFailedOnFailureTask\n\n@app.task(base=JobFailedOnFailureTask, bind=True)\ndef my_task(self, holder: JobHolder):\n    pass\n```\n\n#### Admin\n\n```Django\nfrom django.contrib import admin\n\nfrom celery_growthmonitor.admin import AJobAdmin\n\n@admin.register(MyJob)\nclass MyJobAdmin(AJobAdmin):\n    fields = AJobAdmin.fields + ('my_extra_field',)\n    readonly_fields = AJobAdmin.readonly_fields + ('my_extra_field',)\n\n```\n\n\n  [python]:     https://www.python.org/             \"Python\"\n  [django]:     https://www.djangoproject.com/      \"Django\"\n  [celery]:     http://www.celeryproject.org/       \"Celery\"\n  [echoices]:   https://github.com/mbourqui/django-echoices         \"django-echoices\"\n  [autoslug]:   https://github.com/justinmayer/django-autoslug      \"django-autoslug\"\n  [pandoc]:     http://pandoc.org/index.html        \"pandoc\"","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbourqui%2Fdjango-celery-growthmonitor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbourqui%2Fdjango-celery-growthmonitor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbourqui%2Fdjango-celery-growthmonitor/lists"}