Repository navigation
v0.4.0
Brokers — the services that trigger execution of a saved task — are now separate from the task backend, and Amazon SQS joins Cloud Tasks as one of them.
Existing projects need no changes. The settings, the URLs, the management commands and their defaults all behave as they did in 0.3.
Added
- Amazon SQS broker (
django_database_task.sqs.SQSDatabaseBackend,pip install django-database-task[sqs]). Sends a message naming the task, andrun_database_tasksreceives it. A task deferred beyond the 15 minute SQS delay limit stays in the database for the worker's database sweep. --sourceforrun_database_tasks:auto(default),db,brokerorboth.automeansbothwhen the backend has a broker a worker can receive from, anddbotherwise, so the command is run the same way as before either way.--wait-timeand--max-messagesgo with it.- The broker abstraction (
django_database_task.brokers):TaskBroker,HTTPPushBrokerandPullBroker. A project attaches its own with theBROKERoption. - Several authentication handlers per backend, through
get_auth_handlers(). A request is accepted as soon as one handler accepts it, so the service that calls the endpoints and an external cron job can use different credentials. - Bundled authentication handlers in
django_database_task.auth:SharedSecretAuth,HMACAuthandStaffOnlyAuth, withbuild_signature()for callers that have to sign a request.
Fixed
- Enabling Cloud Tasks OIDC no longer locks every other caller out of the task endpoints. Since 0.3.1 the OIDC handler was applied to all of them, so an external cron job calling
/tasks/run/or/tasks/purge/was rejected. - The Cloud Tasks tests were skipped on every run, in CI included, because the
cloudtasksextra was never installed.
Deprecated
get_auth_handler()(singular). It still works, with aDeprecationWarning, and is removed in 0.5. Overrideget_auth_handlers()instead.
See CHANGELOG.md for the full entry, including the documentation added in this release.
Full Changelog: v0.3.1...v0.4.0