{"id":20037792,"url":"https://github.com/openedx/django-user-tasks","last_synced_at":"2025-04-04T17:04:42.192Z","repository":{"id":36965428,"uuid":"65327499","full_name":"openedx/django-user-tasks","owner":"openedx","description":"A Django application for managing user-triggered asynchronous tasks.","archived":false,"fork":false,"pushed_at":"2025-03-24T00:23:20.000Z","size":539,"stargazers_count":30,"open_issues_count":5,"forks_count":13,"subscribers_count":84,"default_branch":"master","last_synced_at":"2025-03-28T16:04:26.614Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openedx.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-09T20:52:58.000Z","updated_at":"2025-03-20T10:28:41.000Z","dependencies_parsed_at":"2023-02-19T02:46:15.701Z","dependency_job_id":"d6705ac0-8cfe-4c61-9100-6d7043b0a6bf","html_url":"https://github.com/openedx/django-user-tasks","commit_stats":{"total_commits":220,"total_committers":28,"mean_commits":7.857142857142857,"dds":0.55,"last_synced_commit":"baab8260c91905d749a2a9170c705976bcfe5f67"},"previous_names":["edx/django-user-tasks"],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openedx%2Fdjango-user-tasks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openedx%2Fdjango-user-tasks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openedx%2Fdjango-user-tasks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openedx%2Fdjango-user-tasks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openedx","download_url":"https://codeload.github.com/openedx/django-user-tasks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247217172,"owners_count":20903008,"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","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-11-13T10:22:12.546Z","updated_at":"2025-04-04T17:04:42.172Z","avatar_url":"https://github.com/openedx.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"django-user-tasks\n=================\n\n.. image:: https://img.shields.io/pypi/v/django-user-tasks.svg\n    :target: https://pypi.python.org/pypi/django-user-tasks/\n    :alt: PyPI\n\n.. image:: https://github.com/openedx/django-user-tasks/workflows/Python%20CI/badge.svg?branch=master\n    :target: https://github.com/openedx/django-user-tasks/actions?query=workflow%3A%22Python+CI%22\n    :alt: CI\n\n.. image:: http://codecov.io/github/edx/django-user-tasks/coverage.svg?branch=master\n    :target: http://codecov.io/github/edx/django-user-tasks?branch=master\n    :alt: Codecov\n\n.. image:: https://readthedocs.org/projects/django-user-tasks/badge/?version=latest\n    :target: http://django-user-tasks.readthedocs.io/en/latest/\n    :alt: Documentation\n\n.. image:: https://img.shields.io/pypi/pyversions/django-user-tasks.svg\n    :target: https://pypi.python.org/pypi/django-user-tasks/\n    :alt: Supported Python versions\n\n.. image:: https://img.shields.io/github/license/edx/django-user-tasks.svg\n    :target: https://github.com/openedx/django-user-tasks/blob/master/LICENSE.txt\n    :alt: License\n\ndjango-user-tasks is a reusable Django application for managing user-triggered\nasynchronous tasks.  It provides a status page for each such task, which\nincludes a meaningful progress indicator if the task is currently being\nexecuted and provides any appropriate text and/or links for output once the\ntask is complete.\n\nIn Open edX, such tasks include operations such as exporting or importing a\ncourse, sending an email to all the students in a course, uploading a video,\nand other tasks which often take too long to perform during a single web\nrequest (as outlined in `OEP-3`_).  However, this has been written with the\nintention of being useful in a variety of Django projects outside the Open edX\nplatform as well.\n\nNote that this library was created as a consolidation of lessons learned from\nimplementing such tasks in various parts of the Open edX code base.  They\ndon't yet all use this library, but the plan is to over time refactor many of\nthem to do so.\n\n.. _OEP-3: https://open-edx-proposals.readthedocs.io/en/latest/oeps/oep-0003.html\n\nOverview\n--------\n\ndjango-user-tasks is currently a wrapper for `Celery`_ (although the hope is\nthat it could also be extended to also support `channels`_ and other\nasynchronous task queues).  By extending the provided ``UserTask`` class (or\nadding ``UserTaskMixin`` to an existing Task subclass) and providing a\n``user_id`` task argument, the task's status is stored in a database table\nseparate from the Celery broker and result store.  This ``UserTaskStatus``\nmodel allows for full database queries of the tasks that users are most likely\nto care about while not imposing any restrictions on the Celery configuration\nmost appropriate for the site's overall needs for asynchronous task\nprocessing.\n\nMost of the status updating is handled automatically via Celery's `signals`_\nmechanism, but it can be enhanced by:\n\n* Overriding the ``UserTaskMixin`` methods such as ``generate_name`` and\n  ``calculate_total_steps`` for particular types of tasks\n* Calling some of the ``UserTaskStatus`` methods like\n  ``increment_completed_steps`` and ``set_state`` from the task implementation\n* Saving task output as instances of the ``UserTaskArtifact`` model\n\n.. _Celery: http://www.celeryproject.org/\n.. _channels: https://channels.readthedocs.io/en/latest/\n.. _signals: http://docs.celeryproject.org/en/latest/userguide/signals.html\n\nDocumentation\n-------------\n\nThe full documentation is at https://django-user-tasks.readthedocs.org.\n\nLicense\n-------\n\nThe code in this repository is licensed under the Apache Software License 2.0 unless\notherwise noted.\n\nPlease see ``LICENSE.txt`` for details.\n\nHow To Contribute\n-----------------\n\nContributions are very welcome.\n\nPlease read `How To Contribute \u003chttps://github.com/openedx/.github/blob/master/CONTRIBUTING.md\u003e`_ for details.\n\nReporting Security Issues\n-------------------------\n\nPlease do not report security issues in public. Please email security@openedx.org.\n\nGetting Help\n------------\n\nHave a question about this repository, or about Open edX in general?  Please\nrefer to this `list of resources`_ if you need any assistance.\n\n.. _list of resources: https://open.edx.org/getting-help\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenedx%2Fdjango-user-tasks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenedx%2Fdjango-user-tasks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenedx%2Fdjango-user-tasks/lists"}