{"id":17909071,"url":"https://github.com/mback2k/django-celery-model","last_synced_at":"2025-10-14T22:16:48.340Z","repository":{"id":16109439,"uuid":"18854513","full_name":"mback2k/django-celery-model","owner":"mback2k","description":"Keep track of Celery tasks assigned to Django models","archived":false,"fork":false,"pushed_at":"2022-12-26T21:30:28.000Z","size":78,"stargazers_count":36,"open_issues_count":14,"forks_count":20,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-26T19:25:10.482Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mback2k.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-16T20:26:51.000Z","updated_at":"2024-11-28T16:29:09.000Z","dependencies_parsed_at":"2023-01-13T18:42:25.191Z","dependency_job_id":null,"html_url":"https://github.com/mback2k/django-celery-model","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/mback2k/django-celery-model","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mback2k%2Fdjango-celery-model","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mback2k%2Fdjango-celery-model/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mback2k%2Fdjango-celery-model/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mback2k%2Fdjango-celery-model/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mback2k","download_url":"https://codeload.github.com/mback2k/django-celery-model/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mback2k%2Fdjango-celery-model/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271092128,"owners_count":24697903,"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-08-19T02:00:09.176Z","response_time":63,"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":[],"created_at":"2024-10-28T19:19:56.115Z","updated_at":"2025-10-14T22:16:43.321Z","avatar_url":"https://github.com/mback2k.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[django-celery-model](https://github.com/mback2k/django-celery-model) is an\nextension to [Celery](https://github.com/celery/celery) which adds support\nfor tracking Celery tasks assigned to Django model instances.\n\nInstallation\n------------\nInstall the latest version from pypi.python.org:\n\n    pip install django-celery-model\n\nInstall the development version by cloning the source from github.com:\n\n    pip install git+https://github.com/mback2k/django-celery-model.git\n\nConfiguration\n-------------\nAdd the package to your `INSTALLED_APPS`:\n\n    INSTALLED_APPS += (\n        'djcelery_model',\n    )\n\nMake sure that you are receiving Celery events via:\n\n    CELERY_TASK_TRACK_STARTED = True\n    CELERY_TASK_SEND_SENT_EVENT = True\n    CELERY_SEND_EVENTS = True\n\nExample\n-------\nAdd the TaskMixin to your Django model:\n\n    from django.db import models\n    from django.utils.translation import ugettext_lazy as _\n    from djcelery_model.models import TaskMixin\n\n    class MyModel(TaskMixin, models.Model):\n        name = models.CharField(_('Name'), max_length=100)\n\nQueue an asynchronous task from your Django model instance:\n\n    from .models import MyModel\n    from .tasks import mytask\n\n    mymodel = MyModel.objects.get(name='test instance')\n    mymodel.apply_async(mytask, ...)\n\nRetrieve list of asynchronous tasks assigned to your Django model instance:\n\n    mymodel.tasks.all()\n    mymodel.tasks.pending()\n    mymodel.tasks.started()\n    mymodel.tasks.retrying()\n    mymodel.tasks.failed()\n    mymodel.tasks.successful()\n    mymodel.tasks.running()\n    mymodel.tasks.ready()\n\nCheck for a running or ready asynchronous task for your Django model instance:\n\n    mymodel.has_running_task\n    mymodel.has_ready_task\n\nHandle asynchronous task results for your Django model instance:\n\n    mymodel.get_task_results()\n    mymodel.get_task_result(task_id)\n    mymodel.clear_task_results()\n    mymodel.clear_task_result(task_id)\n\nFilter your Django model based upon asynchronous tasks:\n\n    MyModel.objects.with_tasks()\n    MyModel.objects.with_pending_tasks()\n    MyModel.objects.with_started_tasks()\n    MyModel.objects.with_retrying_tasks()\n    MyModel.objects.with_failed_tasks()\n    MyModel.objects.with_successful_tasks()\n    MyModel.objects.with_running_tasks()\n    MyModel.objects.with_ready_tasks()\n\n    MyModel.objects.without_tasks()\n    MyModel.objects.without_pending_tasks()\n    MyModel.objects.without_started_tasks()\n    MyModel.objects.without_retrying_tasks()\n    MyModel.objects.without_failed_tasks()\n    MyModel.objects.without_successful_tasks()\n    MyModel.objects.without_running_tasks()\n    MyModel.objects.without_ready_tasks()\n\nLicense\n-------\n* Released under MIT License\n* Copyright (c) 2014-2019 Marc Hoersken \u003cinfo@marc-hoersken.de\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmback2k%2Fdjango-celery-model","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmback2k%2Fdjango-celery-model","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmback2k%2Fdjango-celery-model/lists"}