2.0.0
This release refactors the Django integration completely. Head to the Django section in the doc to discover how it works.
Here's a summary of the changes:
- When using Procrastinate with Django, you don't need to define a Procrastinate App anymore (actually, you shouldn't do it anymore). As long as Procrastinate is in your
INSTALLED_APPS
, you can useprocrastinate.contrib.django.app
. This special app uses the Django connection and doesn't need opening or closing. - Tasks defined under the
tasks
submodule of any app inINSTALLED_APPS
are loaded by default. This is configurable (you can add paths to load, or change the name of the module containing your tasks in every app) - Some settings can be defined as
PROCRASTINATE_*
in your Django settings. See the complete doc for details (but there are no mandatory settings) - You can run the CLI with
./manage.py procrastinate
(you won't have to configure anApp
either) - Procrastinate now exposes 3 models and the corresponding
ModelAdmins
in your Django Admin. Those models are read-only. The Admin panels are very very basic for now. - Procrastinate is tested with Django tasks that call the classic django ORM and the new async ORM methods.
We've done some effort in bringing this version to completion and ensuring that it's the smoothest ride as possible considering there are breaking changes, but should you find yourself completely lost, feel free to open an issue in the repository.
Thank you @paulzakin for the help in testing out this release!
Migrations
No SQL migrations. There's a Django migration, which you can run safely as it doesn't contain any actual SQL code (you can also run it with --fake
for the same result)
What's Changed
Breaking changes
- Much better Django integration by @ewjoachim in #906
Features
- Periodic decorator is now on Blueprints by @ewjoachim in #918
- Add missing model and simplify launching Worker from Django by @ewjoachim in #919
- Django: PROCRASTINATE_ON_APP_READY by @ewjoachim in #921
- Add logs, evolve Django demo to use blueprints by @ewjoachim in #958
- provide manage.py procrastinate healthchecks by @ewjoachim in #976
Bug Fixes
- DjangoConnector.get_worker_connector() uses psycopg3 if available by @ewjoachim in #946
- Fix import in Django connector by @ewjoachim in #950
- Add explicit error message if users use the django app before .ready() by @ewjoachim in #955
- Fix psycopg3 detection by @Keats in #956
- Make procrastinate.contrib.django.app a proxy by @ewjoachim in #959
- Github merged too quickly by @ewjoachim in #977
- Add static migrations by @ewjoachim in #941
Miscellaneous
- django: small doc details by @ewjoachim in #910
- Fix index by @ewjoachim in #912
- Django demo uses transaction.atomic() by @ewjoachim in #945
- Update PULL_REQUEST_TEMPLATE.md by @ewjoachim in #954
- Add missing documentation section in building changelog by @ewjoachim in #962
- Fix Pyright by @ewjoachim in #975
Documentation
- Add missing Django doc paragraph by @ewjoachim in #920
- Fix doc by @ewjoachim in #922
- Update max_delay description by @sebastien-mcrae in #924
- Fix doc (wrong method) by @ewjoachim in #953
- Changes to the doc & django integration by @ewjoachim in #960
- Fix typo by @ewjoachim in #968
- Reorganize howto doc into real sections by @ewjoachim in #969
- Contributing doc adjustments by @ewjoachim in #970
- Remove mention "but you can if you want to" from django config doc by @ewjoachim in #971
New Contributors
- @sebastien-mcrae made their first contribution in #924
- @Keats made their first contribution in #956
Full Changelog: 1.1.2...2.0.0