Skip to content

cfpb/django-background-tasks

 
 

Repository files navigation

Django Background Tasks – CFPB fork

This repo is a temporary fork of Django Background Tasks, a database-backed work queue for Django.

The upstream code is loosely based on Ruby's DelayedJob library. The Python version was adapted from the now-archived lilspikey django-background-task repo and forked as django-background-tasks – which is updated in this fork for compatibility with Django5 and Python 3.13 and to unify fixes.

The upstream code is available on PyPI as django-background-tasks, but it hasn't been updated since 2024 and has a number of standing issues. Unfortunately the unaddressed issues have contributed to a growing number of uncoordinated forks that have fixed different issues at different times, with conflicting database migrations and PyPI package names.

This fork is intended as a stable version that unifies the fixes and migrations, removes Python2 code and results in a package that is compatible with both Python 3.13 and Django 5. The tests in this repo succeed under those specs.

Since upstream issues are no longer being addressed, we will not be pushing this version upstream as a pull request, nor will it be pushed to PyPI, where there's already too much confusion.

Developer notes

There are two parts to using background tasks:

  • Creating the task functions and registering them with the scheduler
  • Setting up a cron task (or long running process) to execute the tasks

Tasks are implemented as functions or any other callable.

For maintainers: The package version number is specified in the __init__.py file of the repo's background_tasks folder. If you create a release, make sure to update that version number before creating the release, so that the release and the wheel's version number will match.

Upstream docs

See Read the docs.

About

A database-backed work queue for Django

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%