{"id":23558,"library":"django-background-tasks","title":"django-background-tasks","description":"Database backed asynchronous task queue for Django. Version 1.2.8. Release cadence: irregular, last release 2020.","status":"maintenance","version":"1.2.8","language":"python","source_language":"en","source_url":"https://github.com/django-background-tasks/django-background-tasks","tags":["django","async","task-queue","database"],"install":[{"cmd":"pip install django-background-tasks","lang":"bash","label":"pip install"}],"dependencies":[{"reason":"Required; compatible with Django 1.8+ to 3.x","package":"Django","optional":false}],"imports":[{"note":"decorator for scheduling tasks","symbol":"background_task","correct":"from background_task import background_task"},{"note":"Model class is Task, not BackgroundTask","wrong":"from background_task.models import BackgroundTask","symbol":"Task","correct":"from background_task.models import Task, CompletedTask"}],"quickstart":{"code":"# models.py\ndef print_hello():\n    from background_task import background_task\n    @background_task(schedule=10)\n    def hello(name):\n        print(\"Hello %s\" % name)\n    hello(\"World\", schedule=10)\n\n# run: python manage.py process_tasks","lang":"python","description":"Define a task using the decorator and run the worker."},"warnings":[{"fix":"Place @background_task decorator on top-level functions.","message":"The decorator-based task registration must be called at module import time; tasks defined inside functions or conditionally may not be registered.","severity":"gotcha","affected_versions":"all"},{"fix":"Configure logging in settings.py, not via command-line options.","message":"Removed log options from management command; use Django LOGGING setting.","severity":"deprecated","affected_versions":">=1.1.0rc2"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Add 'background_task' to INSTALLED_APPS and run migrations.","cause":"Missing 'background_task' in INSTALLED_APPS or not installed.","error":"ImportError: No module named 'background_task'"},{"fix":"Upgrade to version 1.1.12+ which limits indexed field length to 190 characters.","cause":"MySQL does not allow indexing TEXT columns without a prefix length.","error":"django.db.utils.OperationalError: (1170, \"BLOB/TEXT column 'task_params' used in key specification without a key length\")"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}