Changelog¶
2.15.1¶
Released on 2024-11-26 - GitHub - PyPI
What's Changed
Miscellaneous
Documentation
New Contributors
Full Changelog: 2.15.0...2.15.1
2.15.0¶
Released on 2024-10-19 - GitHub - PyPI
Migrations
02.14.01_01_add_indexes_for_fetch_job.sql
Note
The new indexes will block the table while they are being built. Unless you have millions of jobs in the table, it should not be a problem, but you may want to create the index concurrently if you can. Note that you cant create an index concurrently in a transaction, which is why the migration code we suggested doesn't use the CONCURRENTLY
keyword. To create the index concurrently, replace CREATE INDEX
in the migration code with CREATE INDEX CONCURRENTLY
.
What's Changed
Bug Fixes
Full Changelog: 2.14.1...2.15.0
2.14.1¶
Released on 2024-10-08 - GitHub - PyPI
Migrations
None
What's Changed
Bug Fixes
- Fill missing generic type parameters for JobContext.task by @fau-st in #1218
- Respect the priority of a periodic task by @medihack in #1217
Dependencies
- Make docs dependencies non optional again by @medihack in #1202
- Document dependencies procedures by @ewjoachim in #1204
Full Changelog: 2.14.0...2.14.1
2.14.0¶
Released on 2024-09-19 - GitHub - PyPI
Migrations
None
What's Changed
Miscellaneous
- Fix GitHub's upload-artifact breakage by @ewjoachim in #1179
- Add return type informations for decorated tasks by @fau-st in #1196
Documentation
- Improve task and defer docs by @medihack in #1174
- Add page to docs about job relationships in Django by @medihack in #1191
Dependencies
- Make recent Python versions use recent Django versions by @ewjoachim in #1197
New Contributors
Full Changelog: 2.13.2...2.14.0
2.13.2¶
Released on 2024-08-19 - GitHub - PyPI
Migrations
None
What's Changed
Bug Fixes
- Fix Django + cron using the wrong connector by @ewjoachim in #1164
Miscellaneous
- Add Kai Schlamp as an author by @ewjoachim in #1163
Documentation
- Remove sphinx-autodoc-typehints, upgrade Myst & Sphinx by @ewjoachim in #1153
Full Changelog: 2.13.1...2.13.2
2.13.1¶
Released on 2024-08-15 - GitHub - PyPI
Migrations
None
What's Changed
Bug Fixes
Full Changelog: 2.13.0...2.13.1
2.13.0¶
Released on 2024-08-15 - GitHub - PyPI
Migrations
None
What's Changed
Bug Fixes
Full Changelog: 2.12.0...2.13.0
2.12.0¶
Released on 2024-08-14 - GitHub - PyPI
Migrations
None
What's Changed
Bug Fixes
If you want to document tasks with Sphinx's Autodoc, check the new doc! Following a report from @JacobCoffee in #1152
Full Changelog: 2.11.0...2.12.0
2.11.0¶
Released on 2024-08-09 - GitHub - PyPI
Migrations
None
What's Changed
Miscellaneous
Full Changelog: 2.10.0...2.11.0
2.10.0¶
Released on 2024-08-08 - GitHub - PyPI
Migrations
None
What's Changed
Features
New Contributors
Full Changelog: 2.9.2...2.10.0
2.9.2¶
Released on 2024-07-31 - GitHub - PyPI
Migrations
None
What's Changed
Bug Fixes
Dependencies
Full Changelog: 2.9.1...2.9.2
2.9.1¶
Released on 2024-07-24 - GitHub - PyPI
Migrations
None
What's Changed
Bug Fixes
- Fix django's
procrastinate shell <command>
by @ewjoachim (found by @linspw who contributed a first fix) in #1121
Full Changelog: 2.9.0...2.9.1
2.9.0¶
Released on 2024-07-20 - GitHub - PyPI
Migrations
What's Changed
Features
- Offer hooks to change the priority, queue and lock when retrying a job by @medihack in #1113 . If you have implemented your own RetryStrategy,
get_schedule_in
is now deprecated (but still maintained) and should be replaced withget_retry_decision
.get_schedule_in
support will probably be removed in the next major release, though there's no guarantee that this might happen anytime soon.
Bug Fixes
- Fix SchemaManager.apply_schema by @ewjoachim in #1117
Documentation
- Remove duplicate documentation badge by @ewjoachim in #1104
- Clarify verbosity by @ewjoachim in #1107
Full Changelog: 2.8.0...2.9.0
2.8.0¶
Released on 2024-07-06 - GitHub - PyPI
Migrations
None
What's Changed
Features
- app.replace_connector to ease tests by @ewjoachim in #1102
Miscellaneous
- Remove deprecated file static_migrations.py by @ewjoachim in #1091
Documentation
- Update migrations.md by @ewjoachim in #1086
- [doc] context must be offered as positional argument by @ticosax in #1098
Dependencies
- Deps updates by @ewjoachim in #1103
Uncategorized
New Contributors
Full Changelog: 2.7.0...2.8.0
Notes from @ewjoachim:
As part of this release, we're delighted to announce the addition of @medihack among the procrastinate maintainers! Congratulations and happy maintainance to them and everyone! The project is still welcoming contributors and potentially maintainers, so feel free to have a look at the repo activity if you want to help! Thank you!
2.7.0¶
Released on 2024-06-25 - GitHub - PyPI
Migrations
02.06.00_01_add_cancel_states.sql
What's Changed
Feature
- Job cancellation by @medihack in #1081
This is a new feature that will only impact you if you decide to use it, apart from one minor change: in the procrastinate shell
CLI, the new cancelled, aborting, aborted
states are exposed and calling cancel
on a job used to set is as failed
and will now set it as either cancelled
or aborting
(see the doc for details)
Miscellaneous
- Call configure callback in listen notify by @aleksandr-shtaub in #1078
Full Changelog: 2.6.0...2.7.0
2.6.0¶
Released on 2024-06-20 - GitHub - PyPI
Migrations
02.05.00_01_add_periodic_job_priority.sql
What's Changed
Features
Full Changelog: 2.5.0...2.6.0
2.5.0¶
Released on 2024-06-18 - GitHub - PyPI
Migrations
02.00.03_01_add_job_priority.sql (
What's Changed
Features
- Add job priority feature by @medihack in #1070 . See documentation.
New Contributors
Full Changelog: 2.4.0...2.5.0
2.4.0¶
Released on 2024-06-17 - GitHub - PyPI
Migrations
None
What's Changed
Bug Fixes
- Failing test for pg_job_manager.delete_old_jobs with psycopg2-based lib by @ewjoachim in #1076
Miscellaneous
- Django Migrations are now created as normal files instead of being dynamically generated by @ewjoachim in #1071
Documentation
- Doc typo by @ewjoachim in #1068
Full Changelog: 2.3.0...2.4.0
2.3.0¶
Released on 2024-05-21 - GitHub - PyPI
Migrations
None
What's Changed
Features
Miscellaneous
- test_get_sync_connector__[not]_open as integration test, not unit test by @ewjoachim in #1057
Documentation
- fix: syntax error in connector basics docs by @mplemay in #1044
- update django integration testing docs by @ewjoachim in #1058
- docs: add more context around queueing_locks by @onlyann in #1052
New Contributors
Full Changelog: 2.2.0...2.3.0
2.2.0¶
Released on 2024-04-17 - GitHub - PyPI
Migrations
None
What's Changed
Features
Miscellaneous
- Use ewjoachim/poetry-to-pre-commit by @ewjoachim in #1033
Documentation
- doc: Fix typo in custom connection pool section by @ducdetronquito in #1025
- docs: Fix typo in blueprints section by @ducdetronquito in #1026
- Add documentation for shell command by @ewjoachim in #1041
New Contributors
Full Changelog: 2.1.0...2.2.0
2.1.0¶
Released on 2024-03-25 - GitHub - PyPI
Migrations
None
What's Changed
Features
- Add psycopg pool factory by @stinovlas in #1024
Miscellaneous
- Renovate weekly (less noisy) by @ewjoachim in #1021
- Update renovate.json5 by @ewjoachim in #1023
Full Changelog: 2.0.3...2.1.0
2.0.3¶
Released on 2024-03-23 - GitHub - PyPI
Migrations
None
What's Changed
Bug Fixes
- Fix warnings, and enable warnings as errors in CI by @ewjoachim in #1013
- Fix
IntegrityErrors
with the Django connector by @ewjoachim in #1014
Miscellaneous
- Adding CI for py3.12 by @ewjoachim in #1015
- Group renovate updates by @ewjoachim in #1016
Dependencies
- Upgrade of asgiref brings a fix that means we stop workers more efficiently by @ewjoachim in #1012
Full Changelog: 2.0.2...2.0.3
2.0.2¶
Released on 2024-03-20 - GitHub - PyPI
Migrations
None
What's Changed
Bug Fixes
- Fix parsing of defer CLI command --at and --in options by @stinovlas in #1002
Documentation
- doc: Typo in discussions.md by @ducdetronquito in #1001
New Contributors
- @stinovlas made their first contribution in #1002
Full Changelog: 2.0.1...2.0.2
2.0.1¶
Released on 2024-03-19 - GitHub - PyPI
Migrations
None
What's Changed
Miscellaneous
- Tie pyright version in GHA to pyright version in pre-commit by @ewjoachim in #985
- Update renovate rules, #988, #992
Documentation
- fix: Typo by @ducdetronquito in #980
- fix: Typo in django/configuration.md by @ducdetronquito in #990
- doc: Typo in django/basic_usage.md by @ducdetronquito in #991
- doc: Typo in blueprints.md by @ducdetronquito in #1000
New Contributors
- @ducdetronquito made their first contribution in #980
Full Changelog: 2.0.0...2.0.1
2.0.0b9¶
Released on 2024-03-10 - GitHub - PyPI
We're still in the process of evaluating changes to the Django integration. For stability it's advised to wait for a stable release (...duh). Of course, volunteers for testing in the beta are highly appreciated. Contact us through here.
Migrations
None
What's Changed
Features
- provide
manage.py procrastinate healthchecks
by @ewjoachim in #976
Bug Fixes
- Github merged too quickly by @ewjoachim in #977
Miscellaneous
- Fix Pyright by @ewjoachim in #975
Documentation
- 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
Full Changelog: 2.0.0b8...2.0.0b9
2.0.0¶
Released on 2024-03-10 - GitHub - PyPI
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
2.0.0b8¶
Released on 2024-03-06 - GitHub - PyPI
We're still in the process of evaluating changes to the Django integration. For stability it's advised to wait for a stable release (...duh). Of course, volunteers for testing in the beta are highly appreciated. Contact us through here.
Migrations
None
What's Changed
Miscellaneous
- Add missing documentation section in building changelog by @ewjoachim in #962
Documentation
- Changes to the doc & django integration tests by @ewjoachim in #960
Full Changelog: 2.0.0b7...2.0.0b8
2.0.0b7¶
Released on 2024-03-02 - GitHub - PyPI
We're still in the process of evaluating changes to the Django integration. For stability it's advised to wait for a stable release (...duh). Of course, volunteers for testing in the beta are highly appreciated. Contact us through here.
Migrations
None
What's Changed
Features
- Add logs, evolve Django demo to use blueprints by @ewjoachim in #958
Bug Fixes
- Make procrastinate.contrib.django.app a proxy by @ewjoachim in #959
Full Changelog: 2.0.0b6...2.0.0b7
2.0.0b6¶
Released on 2024-03-01 - GitHub - PyPI
We're still in the process of evaluating changes to the Django integration. For stability it's advised to wait for a stable release (...duh). Of course, volunteers for testing in the beta are highly appreciated. Contact us through here.
Migrations
None
What's Changed
Bug Fixes
New Contributors
Full Changelog: 2.0.0b5...2.0.0b6
2.0.0b5¶
Released on 2024-02-29 - GitHub - PyPI
We're still in the process of evaluating changes to the Django integration. For stability it's advised to wait for a stable release (...duh). Of course, volunteers for testing in the beta are highly appreciated. Contact us through here.
Migrations
None
What's Changed
Bug Fixes
- Add explicit error message if users use the django app before .ready() by @ewjoachim in #955
Miscellaneous
- Update PULL_REQUEST_TEMPLATE.md by @ewjoachim in #954
Documentation
- Fix doc (wrong method) by @ewjoachim in #953
Full Changelog: 2.0.0b4...2.0.0b5
2.0.0b4¶
Released on 2024-02-28 - GitHub - PyPI
We're still in the process of evaluating changes to the Django integration. For stability it's advised to wait for a stable release (...duh). Of course, volunteers for testing in the beta are highly appreciated. Contact us through here.
Migrations
None
What's Changed
Bug Fixes
- Fix import in Django connector by @ewjoachim in #950
Full Changelog: 2.0.0b3...2.0.0b4
2.0.0b3¶
Released on 2024-02-25 - GitHub - PyPI
We're still in the process of evaluating changes to the Django integration. For stability it's advised to wait for a stable release (...duh). Of course, volunteers for testing in the beta are highly appreciated. Contact us through here.
Migrations
None
What's Changed
Bug Fixes
- DjangoConnector.get_worker_connector() uses psycopg3 if available by @ewjoachim in #946
Miscellaneous
- Django demo uses transaction.atomic() by @ewjoachim in #945
Full Changelog: 2.0.0b2...2.0.0b3
2.0.0b2¶
Released on 2024-02-17 - GitHub - PyPI
We're still in the process of evaluating changes to the Django integration. For stability it's advised to wait for a stable release (...duh). Of course, volunteers for testing in the beta are highly appreciated.
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
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
Miscellaneous
- Add static migrations by @ewjoachim in #941
Docs
- django: small doc details by @ewjoachim in #910
- 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 README by @ewjoachim in #912
New Contributors
- @sebastien-mcrae made their first contribution in #924
Full Changelog: 2.0.0b1...2.0.0b2
2.0.0b1¶
Released on 2024-01-25 - GitHub - PyPI
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. 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
(if you use that, you won't have to configure anApp
either) - Procrastinate now exposes 2 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.
What's Changed
Breaking changes
- Much better Django integration, implemented in #906
Kudos
While Procrastinate is mainly developed by myself, multiple contributors helped shaping this release over the last 2 years that it's been slowly boiling:
- @michaszcz for the original Django Connector PR, and @wgordon17, @mecampbellsoup, @adriangb for helpful comments
- @ignaciocabeza, and especially @turicas in #363 for submitting clear and actionable design directions that were very useful in deciding how to do this
- @paulzakin and @ponas for sharing ideas & feedback over on Discord (by the way, we now have a Discord server)
Full Changelog: 1.1.2...2.0.0
1.1.2¶
Released on 2024-01-23 - GitHub - PyPI
Migrations:
- https://github.com/procrastinate-org/procrastinate/blob/main/procrastinate/sql/migrations/01.01.01_01_job_id_bigint.sql
Switchesinteger
tobigint
in procedure signatures (useful if you have more than 2B tasks)
What's Changed
Bug Fixes
- Switch remaining integer
job_id
elements tobigint
, reported by @Vladimir-Filimonov via #902 - Aiopg: pass original kwargs to psycopg2, reported by @amacfie-tc via #909
Miscellaneous
- Switch doc to Markdown by @ewjoachim in #904
- Fix badges by @ewjoachim in #905
Full Changelog: 1.1.1...1.1.2
1.1.1¶
Released on 2024-01-17 - GitHub - PyPI
Migrations
None
What's Changed
Bugfixes
- Worker: install_signal_handlers=True/False by @ewjoachim / @sevaho in #894
Miscellaneous
- Update badges by @ewjoachim in #900
Full Changelog: 1.1.0...1.1.1
1.1.0¶
Released on 2024-01-14 - GitHub - PyPI
Migrations
Yes ! For the first time in a while, there are migrations. They're mainly dropping old functions now that we're in 1.0, following our migration doc. As a reminder, you should apply the migrations listed for 1.0 (such as the one below) before you upgrade to 1.1.
What's Changed
Miscellaneous
- Apply future migrations following the release of 1.0 by @ewjoachim in #893
Dependencies
- Upgrade to upload-artifact@v4 by @ewjoachim in #891
Misc
- Update pr-labels.yml by @ewjoachim in #892
Full Changelog: 1.0.3...1.1.0
1.0.3¶
Released on 2024-01-14 - GitHub - PyPI
Migrations
None
Miscellaneous
- Tentatively fix pypi release
1.0.2¶
Released on 2024-01-14 - GitHub - PyPI
Migrations
None
Miscellaneous
- Improve release management by @ewjoachim in #889
- Static type analysis with Pyright by @ewjoachim in #887
Full Changelog: 1.0.1...1.0.2
1.0.1¶
Released on 2024-01-13 - GitHub - PyPI
Migrations
None
Documentation
- Doc with Furo (#888)
1.0.0¶
Released on 2024-01-13 - GitHub - PyPI
A word from the maintainer:
This is the first major release for Procrastinate, and the 50th release of the project. The project has been moving a lot up until 2021, and has slowed down since. In the last year or so, it was almost dormant. One of the reasons was the poor state of sync vs async compatibility code, which made new contributions more complex. It took a few month to gather the motivation for solving this, but the release of the excellent
Psycopg3
, as well as the opportunity to useasgiref
's sync/async compatibility code opened the door for new solutions.This release wouldn't have existed without the help of the users who gave their opinion in #882, and especially @paulzakin and their team who tested beta versions in real-life scenarios.
I'd love for the procrastinate developer team to be bigger, as I'm the only person committing to the project these days (... except for dependency bots, of course). If you use Procrastinate in your life, and would like to give back a little bit of time now and then, please don't hesitate to come say hi (#748).
Happy new year, happy upgrading, and let us know if anything breaks :)
Cheers, Joachim
Migrations
None
Breaking changes
The following is a consequence of the merge of #753 (see also #882)
Aiopg
andPsycopg2
connectors are nowcontrib
. To use them, you'll need to import them withfrom procrastinate.contrib.aiopg import AiopgConnector
andfrom procrastinate.contrib.psycopg2 import Psycopg2Connector
. Also, the dependencies toaiopg
andpsycopg2
are now optional: usepip install procrastinate[aiopg]
orpip install procrastinate[psycopg2]
(orpip install procrastinate[aiopg,psycopg2]
for both)- The main supported connector is now the
PsycopgConnector
that uses Psycopg 3 (andSyncPsycopgConnector
). Please note thatPsycopgConnector
accepts parameters based onpsycopg_pool.ConnectionPool
, which has a slightly different signature from thepsycopg2
/aiopg
counterpart, the main difference is that the connection arguments are now passed asPsycopgConnector(kwargs={"host": "..."})
(instead ofAiopgConnector(host=...)
). Other parameters may have changed too, please check the documentation. - Actually, you probably won't need sync connectors anymore because the Async connectors are now able to derive a sync connector when called in a sync context. You should try defining a single (async) connector in your code such as
PsycopgConnector
(orAiopgConnector
), see if it works with all your existing code and don't hesitate to report potential issues. Synchronous connectors are still available in case you need it, so it should be a workaround in most cases. - Synchronous tasks are now launched asynchronously in a ThreadPoolExecutor using
asgiref.sync_to_async
. That said, because of the Global Interpreter Lock (GIL), CPU-consuming tasks will not run faster with parallelization. - The CLI parser has changed. The main differences should be around the order of arguments vs flag, and around environment variables. If you find something unexpected, please open an issue.
- Opening your app at the same time you instantiate it is now discouraged. Ideally, define your app as a module variable, and open it in the appropriate function (when your process starts). In the future, we may expose new helpers for doing this easily with django. Note that when you use the Procrastinate CLI, it takes care of opening/closing the app properly.
JobManager.check_connection
was an async method. It becamecheck_connection_async
for consistency.check_connection
was created a the sync counterpart.
Dependencies
- Update Deps with major upgrades (major) (#875)
Kudos:
@paulzakin for testing, and the folks who contributed to #882
0.34.0b2¶
Released on 2024-01-11 - GitHub - PyPI
Fix issue in main
0.34.0b1: A pre-release for testing sync/async changes to come¶
Released on 2024-01-07 - GitHub - PyPI
Migrations
None
Breaking changes
#753 :
Aiopg
andPsycopg2
connectors are nowcontrib
. To use them, you'll need to import them withfrom procrastinate.contrib.aiopg import AiopgConnector
andfrom procrastinate.contrib.psycopg2 import Psycopg2Connector
. Also, the dependencies toaiopg
andpsycopg2
are now optionnal: usepip install procrastinate[aiopg]
orpip install procrastinate[psycopg2]
(orpip install procrastinate[aiopg,psycopg2]
for both)- The main supported connector is now the
PsycopgConnector
that use Psycopg 3 (andSyncPsycopgConnector
) - Actually, you probably won't need sync connectors anymore because the Async connectors are now able to derive a sync connector when called in a sync context. So try defining a single (async) connector in your code such as
PsycopgConnector
(orAiopgConnector
). - Synchronous tasks are now launched asynchronously in a ThreadPoolExecutor using
asgiref.sync_to_async
. - Some CLI commands that used to accept parameter in any order now won't. It should be mainly mixing positional CLI args vs flags: you used to be able to do
procrastinate defer x --unknown {}
and now you'll have to put all positional arguments first and flags last:procrastinate defer x {} --unknown
. We can't guarantee that there won't be other subtle breaks around this (e.g. environment variable support). That said, if you discover a change, feel free to open a ticket, if it's easily fixable, we might fix it. - Opening your app at the same time you instantiate it is now discouraged. Ideally, define your app as a module variable, and open it in the appropriate function (when your process starts). In the future, we may be exposing helpers for doing this easily with django. Note that when you use the Procrastinate CLI, it takes care of opening/closing the app properly.
Discussion about these changes happen in #882
0.33.0: Fix import error¶
Released on 2023-12-28 - GitHub - PyPI
Migrations
None
Bugfix
- Don't throw an importError if psycopg(3) can't be imported, unless user is actually using it (#881)
Kudos:
0.32.0: Better handle BaseException in Worker¶
Released on 2023-12-21 - GitHub - PyPI
Migrations
None
- Ensure jobs are scheduled for retry regardless of exception type raised (#878)
Dependencies
- [pre-commit.ci] pre-commit autoupdate (#877)
Kudos:
0.31.0: Same as 0.30.0¶
Released on 2023-12-16 - GitHub - PyPI
(We needed a new version number for administrative reasons)
0.30.0: Psycopg v3 compatibility¶
Released on 2023-12-16 - GitHub - PyPI
Migrations
https://github.com/procrastinate-org/procrastinate/tree/main/procrastinate/sql/migrations
Features
- Add psycopg3 compat (#863)
Kudos:
0.29.1: Open files with explicit encodings¶
Released on 2023-12-13 - GitHub - PyPI
Migrations
None
Bugs
- Set encoding=utf-8 when reading files to avoid warnings (#873)
Dependencies
#868, #870, #867, #866, #864, #862, #861, #860, #858, #859, #857, #855, #856, #853, #851, #850, #847, #848, #872, #849
Kudos:
0.30.0rc1: A preview of breaking changes to come in #753¶
Released on 2023-11-01 - GitHub - PyPI
Migrations
None
Breaking changes
#753 brings import changes to the way sync and async work in procrastinate.
-
We've tried to remove some place where we "seemlessly" executed async code from sync calls because it wasn't seemless at all. Most of the sync methods that are just wrappers over async methods with syntax sugar to avoid having to run the even loop yourself, have been removed. This means all the sync methods of
JobManager
andApp.check_connection
. TheAsyncConnector
subclasses don't support being called via sync methods anymore. The way to fix this if you were using it is to use async code when interacting with Procrastinate's systems (so from sync code, either useasyncio.run
orasgiref.sync.async_to_sync
and call async methods). -
The remaining methods on the sync API are:
Task.defer
which is implemented as a synchronous function and will stay that wayApp.run_worker
has been reimplemented on top ofApp.run_worker_async
. It uses its own event loop. This is probably the only case where it makes sense that Procrastinate provides a sync shortcut because it's a long-lived call. For all other async methods, trying to handle the event loop in Procrastinate is likely to cause more problem than it solves, whereas the caller is in a much better solution to solve it the right way as they're in control of the process they run the code from.- Providing your synchronous tasks for Procrastinate to run has a much better support now, thanks to
asgiref.sync.sync_to_async
.
Those are the 3 only part of the synchronous Procrastinate API that are left. We don't plan to remove them, and they're enough to get almost all of the nice things of procrastinate in your sync project. If Procrastinate doesn't drastically change in the future, there's no reason we'd want to add more sync stuff.
-
Due to dropping Click in favor of argparse for async reasons, some commands that accepted parameter in any order now don't. It should be mainly mixing positional CLI args and flags: you used to be able to do
procrastinate defer x --unknown {}
and now you'll have to put all positional args first:procrastinate defer x {} --unknown
. I can't guarantee that there won't be other subtle breaks around this (e.g. environment variable support). That said, if you discover a change, feel free to open a ticket, if it's easily fixable, we might fix it. -
You may have issues if you call
App.open
right after creating the app.- Ideally, open the app only in the context where you know you'll be using it (in a given process, you'll likely either use the sync app or the async app, not both, so try to open only the one you'll use)
- Ideally, try to open the app at the start of the process and close it at the end. It might not be easy to find the exact right place to do so, but we'll try to give some advice. For Django, for example, that might be an
AppConfig.ready()
andatexit
(from the standard lib). YMMV. - For app configured with a sync connectors, use
app.open()
andapp.close()
(orwith app.open()
). With an async connector, useawait app.open_async()
andawait app.close_async()
orasync with app.open_async()
. Callingapp.open()
on an async app is not supported anymore.
Dependencies
- Lock file maintenance (#856)
- Lock file maintenance (#853)
- Bump urllib3 from 2.0.6 to 2.0.7 (#851)
- Lock file maintenance (#850)
- Update Deps with major upgrades to v2 (major) (#847)
- Lock file maintenance (#848)
- [pre-commit.ci] pre-commit autoupdate (#849)
Kudos:
@dependabot, @dependabot[bot], @ewjoachim, @pre-commit-ci, @pre-commit-ci[bot], @renovate and @renovate[bot]
0.29.0¶
Released on 2023-10-05 - GitHub - PyPI
Migrations
None
Breaking change
- When a job ends with an exception, but it's retried, instead of logging the exception at "ERROR" level, it logs as "INFO" level. (#845)
Dependencies
- #841, #843, #840, #839, #836, #835, #834, #825, #832, #831, #830, #828, #829, #827, #826, #824, #822, #820, #819, #842, #837,
#833, #823
Kudos:
0.28.0¶
Released on 2023-09-01 - GitHub - PyPI
Migrations
None
Breaking changes
- Drop Py3.7, upgrade deps (#805)
Documentation & code annotations
- Update blueprints annotations (#787)
- Update middleware docs (#754)
- Add complete details on how to integrate with Django (#745)
- Update cron.rst (#750)
- Readme: Additional contributors (#749)
- Update README.rst (#744)
- Fix doc links (#743)
- Fix code of conduct url in README.rst (#730)
Dependencies
- Update dependency flake8 to v6 (#817)
- Update dependency importlib-resources to v6.0.1 (#815)
- Update dependency psycopg2-binary to v2.9.7 (#814)
- Update dependency Sphinx to v7.1.2 (#813)
- Update dependency django to v4.2.4 (#812)
- Update dependency Sphinx to v7.1.1 (#808)
- Update dependency tomlkit to v0.12.1 (#807)
- Update dependency tomlkit to v0.12.0 (#806)
- Update Deps with major upgrades (major) (#794)
- Lock file maintenance (#797)
- Update Deps with major upgrades (major) (#791)
- Lock file maintenance (#792)
- Bump sqlparse from 0.4.3 to 0.4.4 (#776)
- Bump requests from 2.28.2 to 2.31.0 (#790)
- Update Deps with major upgrades (major) (#784)
- Update Deps with major upgrades (major) (#783)
- Update Deps with minor upgrades (#782)
- Update Deps with major upgrades (major) (#770)
- Update Deps with minor upgrades to v2.0.12 (#781)
- Update Deps with minor upgrades (#779)
- Update dependency importlib-metadata to v6.6.0 (#777)
- Update Deps with minor upgrades (#775)
- Update dependency importlib-metadata to v6.4.1 (#773)
- Update dependency sphinx-autodoc-typehints to v1.23.0 (#772)
- Update dependency croniter to v1.3.14 (#769)
- Update Deps with major upgrades (major) (#758)
- Update dependency importlib-metadata to v6.2.1 (#768)
- Update Deps with minor upgrades to v1.3.10 (#767)
- Update Deps with minor upgrades to v2.0.9 (#766)
- Update Deps with minor upgrades (#765)
- Update dependency black to v23.3.0 (#764)
- Update dependency tomlkit to v0.11.7 (#762)
- Update dependency pytest-asyncio to v0.21.0 (#760)
- Update Deps with minor upgrades (#759)
- Update Deps with minor upgrades (#757)
- Bump django from 3.2.17 to 3.2.18 (#739)
- Lock file maintenance (#734)
- Update Deps with major upgrades (major) (#666)
- Bump django from 3.2.16 to 3.2.17 (#733)
- Lock file maintenance (#731)
- Lock file maintenance (#727)
- Lock file maintenance (#725)
- [pre-commit.ci] pre-commit autoupdate (#804)
- [pre-commit.ci] pre-commit autoupdate (#802)
- [pre-commit.ci] pre-commit autoupdate (#798)
- [pre-commit.ci] pre-commit autoupdate (#796)
- [pre-commit.ci] pre-commit autoupdate (#793)
- [pre-commit.ci] pre-commit autoupdate (#789)
- [pre-commit.ci] pre-commit autoupdate (#778)
- [pre-commit.ci] pre-commit autoupdate (#763)
- [pre-commit.ci] pre-commit autoupdate (#761)
- [pre-commit.ci] pre-commit autoupdate (#756)
- [pre-commit.ci] pre-commit autoupdate (#741)
- [pre-commit.ci] pre-commit autoupdate (#738)
- [pre-commit.ci] pre-commit autoupdate (#732)
Kudos:
@adibsaad, @mininao, @paulzakin and @turicas 👏
0.27.0: Fixing importlib compatibility¶
Released on 2023-01-10 - GitHub - PyPI
Migrations
None
Breaking changes
When using Python < 3.9
, Procrastinate is not compatible anymore with importlib_resources < 1.4
(#724)
Dependencies
- [pre-commit.ci] pre-commit autoupdate (#723, #716, #714, #712, #709, #706, #701, #697, #692)
- Lock file maintenance (#721, #717, #715, #713, #711, #707, #705, #703, #700, #699, #696, #694, #691)
- Bump certifi from 2022.9.24 to 2022.12.7 (#710)
- Update fountainhead/action-wait-for-check action to v1.1.0 (#693)
Miscellaneous
- Fix GitHub Actions badge (#720)
0.26.0: Fix metadata¶
Released on 2022-10-08 - GitHub - PyPI
Migrations
None
Misc
- Fix project metadata (#690)
Dependencies
0.25.2: Re-fixing the deploy workflow¶
Released on 2022-09-27 - GitHub - PyPI
Migrations
None
Changelog
- This time, the Deploy workflow will work!
0.25.1: friendly error for get_full_path failures¶
Released on 2022-09-27 - GitHub - PyPI
Migrations
None
Bugfix
- friendly error for get_full_path failures (#682)
Dependencies
- Automated deps maintenance (#683, #679, #677, #673, #668, #665, #663, #661, #659, #681, #680, #678, #675, #667, #664, #662)
- Update deps (#660)
- Sphinx 5 (#658)
Kudos:
0.25.0: Mostly shenanigans¶
Released on 2022-07-21 - GitHub - PyPI
Migrations
None
Bugfixes
- SQL Alchemy integrity Error (& hole in coverage) (#642)
- Use typing_extensions only if Python < 3.8 (#656)
Documentation
- Document usage of Sentry with Procrastinate (#647)
- Clarify
schedule_in
docstring (#595) - Fix link in readme (#640)
Dependencies shenaningans
There should be much less noise in the future thanks to Renovate.
- use setup-python v4 (#638, #639)
- Revert changes to the deploy workflow (#578)
- Sync pre-commit and poetry (#650)
- Use Renovate instead of Dependabot (#648, #634, #629, #628, #627, #619, #632, #636)
- Dependabot (#616, #617, #618, #614, #613, #610, #611, #612, #600, #601, #602, #603, #604, #596, #597, #598, #599, #594, #593, #589, #588, #590, #582, #583, #584, #585, #579, #580)
- Pre-commit CI (#654, #643, #631, #615, #608, #607, #591, #587, #581, #575)
- Renovate (#655, #653, #652, #635, #625, #622, #624, #621)
- Clear CI cache by updating deps (#641)
Kudos:
Thank you @abe-winter for multiple contributions! 🎉
Thank you @pmav99 for a first public PR ever in this repo! 🎉
0.24.1: Fix deploy workflow¶
Released on 2022-04-21 - GitHub - PyPI
Migrations
None
Changelog
- Fix deploy workflow (#577)
0.24.0¶
Released on 2022-04-21 - GitHub - PyPI
Migrations
This PR doesn't add a new migration, however, it fixes an issue with a previous release where a migration was created and didn't have the proper name, ending up not being advertised in the changelog.
This is the migration:
If you're unsure whether you need to apply the migration or not, here's a rundown:
- If you are currently anywhere between 0.23 and 0.24 included and there is no newer version at the time you read this, you can safely apply the migration. Even if it has already been applied, it will be a noop.
- If you're working up versions and will continue to apply migrations after 0.24, you can safely apply the migration as long as it's in order (so if there is a migration 0.25, apply this one and then 0.25)
- If you have already applied migrations for 0.25 or above... well it depends :) Either analyze the migrations that you have applied and see if there could be a clash, or open an issue and we'll look at it together.
Breaking changes
- Harmonize periodic logs with other job logs (#507)
If your workflow depend on exact log messages, then you may want to experiment with the new version. The messages are more consistent. - Renamed old improperly named migration (#576)
Dependencies
- Bump attrs, black, croniter, django, dunamai, importlib-metadata, mypy, psycopg2-binary, pytest-asyncio, pytest-click, pytest-mock, sphinx-github-changelog, tomlkit, types-croniter, types-psycopg2, types-python-dateutil (#508, #509, #514, #516, #515, #513, #523, #522, #526, #530, #529, #528, #527, #538, #537, #536, #541, #542, #547, #548, #549, #550, #551, #553, #552, #558, #556, #555, #562, #561, #565, #567, #566, #570, #572, #571, #573)
- [pre-commit.ci] pre-commit autoupdate (#505, #519, #525, #545, #569)
- update deps (#559, #517)
Miscellaneous
Workflows, CI, etc
- Fix publish workflow (#520, #518)
- Switch to main branch (#531)
- Switch to python-coverage-comment-action (#532, #533, #534)
- Auto-merge dependabot PRs when they pass the CI (#539)
- Change how the dependabot PRs are automerged (#543)
- Delete dependabot-auto-merge.yml (#544)
Kudos
0.23.0: Arguments for periodic tasks¶
Released on 2021-12-19 - GitHub - PyPI
Migrations
The following migration should have been part of the 0.23 release, but due to a naming error, it wasn't originally displayed as such.
Here is a link to the migration as it was when the tag was issued:
Breaking changes
- Arguments for periodic tasks 436 (#471): If you configured multiple periodic scheduling based on the same task, you now need to define them with explicitely different
periodic_id
: https://procrastinate.readthedocs.io/en/latest/howto/cron.html#scheduling-a-job-multiple-times-with-multiple-arguments . Also, if you relied on the fact that periodic schedules configures on the same task but with different queues were seen as independent schedules (https://github.com/procrastinate-org/procrastinate/blob/0.22.0/docs/howto/cron.rst#queue-lock-queuing-lock or #289), you will probably need to update your code and define uniqueperiodic_ids
in addition to the queues.
Features
- Arguments for periodic tasks 436 (#471)
Bugfixes
- Fix problem with AsyncMock (#504) (only impacted tests)
Misc
- Bump mypy from 0.910 to 0.920 (#503)
- Bump pytest-django from 4.5.1 to 4.5.2 (#499)
- Bump django from 3.2.9 to 3.2.10 (#500)
- Bump black from 21.11b1 to 21.12b0 (#501)
- [pre-commit.ci] pre-commit autoupdate (#498)
Kudos:
0.22.0: Blueprints, with_connector, list_locks, py3.10 etc.¶
Released on 2021-12-05 - GitHub - PyPI
Migrations
None (TODO: replace if there are migrations)
https://github.com/procrastinate-org/procrastinate/tree/master/procrastinate/sql/migrations
Breaking changes & news
This release officially adds Blueprints with their supported API. See the documentation for details. Note that if you used blueprints from Procrastiate 0.21, this is a breaking change.
Also, starting with this version, when the worker cannot function correctly (e.g. when it looses access to the database), it will crash instead of entering a half-broken state. This way, you get to define your own restart strategy, with back-off etc, the way you want.
App.with_connector
lets you create multiple synchronized apps with different connectors, in case you need to support both a sync and an async app.
In procrastinate shell
, a new list_locks
command lets you find out about task locks that are currently set, to simplify the hunting for longstanding locks.
Support for python3.6 has been removed, support for python3.10 has been added.
Documentation has been updated regarding where you should place your app. In particular, in case you put your app in the module whose __name__
is __main__
, a warning is now emitted, because this could lead to issues.
Periodic tasks used to all share a lock, so no 2 periodic tasks could run at the same time. This is now fixed.
And finally, did you notice ? The repository moved to the procrastinate-org
organization, yay !
Features
- Second pass on blueprints (#428)
- App.with_connector (#463)
- Add list_locks (#401)
- Remove support for Python 3.6, add support for 3.10 (#470)
Bugfixes
- Stop the whole worker process when a coroutine raises (#494)
- Add a stack check (#442)
- Null locks are ignored (#402)
Misc
- Fix longstanding Mypy issues (#490)
- Add croniter-types (#476)
- First wave of CODEOWNERS update (#462)
- Update dev-env (#475)
- Tweaks in the contribution doc (#472)
- Remove a bit of repetition in docs/requirements.txt by using extras (#457)
- Add empty setup.py to counter dependabot bug. (#458)
- Switch org to procrastinate-org (#459)
Bots
- Bump typing-extensions from 4.0.0 to 4.0.1 (#496)
- Bump pytest-django from 4.4.0 to 4.5.1 (#495)
- [pre-commit.ci] pre-commit autoupdate (#492)
- [pre-commit.ci] pre-commit autoupdate (#489)
- [pre-commit.ci] pre-commit autoupdate (#485)
- Bump importlib-resources from 5.2.2 to 5.4.0 (#481)
- Bump django from 3.2.8 to 3.2.9 (#483)
- Bump aiopg from 1.3.2 to 1.3.3 (#480)
- Bump dunamai from 1.6.0 to 1.7.0 (#484)
- Bump click from 8.0.1 to 8.0.3 (#482)
- [pre-commit.ci] pre-commit autoupdate (#477)
- Bump pytest-cov from 2.12.1 to 3.0.0 (#466)
- Bump aiopg from 1.3.1 to 1.3.2 (#468)
- Bump django from 3.2.7 to 3.2.8 (#467)
- Bump sqlalchemy from 1.4.25 to 1.4.26 (#473)
- Bump pytest-asyncio from 0.15.1 to 0.16.0 (#474)
- [pre-commit.ci] pre-commit autoupdate (#469)
- [pre-commit.ci] pre-commit autoupdate (#464)
Kudos:
0.21.0: Support for SQLAlchemy¶
Released on 2021-09-27 - GitHub - PyPI
Migrations
None
Breaking changes
- Remove auto-loading of tasks (#425): before this version, if a task was not loaded as a side effect of the app, and its module was not specified in the
import_paths
parameters of the app, and a worker received that task, it tried as a last-resort attempt, to load this task through its name. This meant that someone controlling a task name could make the worker load any code. The feature was removed altogether.
If your worker emited warnings likeTask at {task_name} was not registered, it's been loaded dynamically.
(with log actionload_dynamic_task
), it means you need to change the code for it to work. If the warning was not emitted, you're good to go.
Features
- Add a connector for SQLAlchemy with Psycopg2 (#453)
Bugfix
- Misconfiguration of extra deps meant that the lib always depended on Django (#453)
Misc
- Remove redundant word in worker logging (#446)
- path_hook should raise ImportError when a module isn't found (#430)
- Add Blueprint and lazy registration pattern (#423) (though it's being refactored at the moment, it's advised to wait for the next release)
Documentation
Process
- Fix typo in path (#429)
- Replace codecov with Coverage-Comment (#455, #456)
- [pre-commit.ci] pre-commit autoupdate (#450, #443, #439 #434, #433)
- Fix CI python version (#435)
Kudos:
0.20.0: Bugfixes, performance, & janitoring¶
Released on 2021-07-30 - GitHub - PyPI
Migrations
Features
- Add index to procrastinate_jobs for improved fetch_job performance (#396)
Bug Fixes
- Psycopg2: % in queries need to be escaped (#427)
- Attributes on the decorated task function shouldn't leak on the task (#399)
Miscellaneous
- Update deps & fix docs (#426)
- [pre-commit.ci] pre-commit autoupdate (#422, #420, #418, #416, #414, #411, #408, #407, #405, #404, #398)
- Add Dependabot auto upgrade PR (#415)
- Bring some improvements to dev-env script (#413)
- Goodbye Mickaël - Remove @mgu from codeowners (#406)
- Add support for Python 3.9 & boilerplate (#397)
Kudos:
0.19.0: define additional context on the worker¶
Released on 2021-04-16 - GitHub - PyPI
Migrations
None
Features
- Make it possible to define additional context on the worker (#392)
Bug Fixes
Miscellaneous
Kudos:
@elemoine, @ewjoachim and @mxd4
0.18.2: Fix SQL migration compatibility issue¶
Released on 2021-02-05 - GitHub - PyPI
Migrations
The following migration fixes a schema bug introduced in 0.18.0
. Please make sure to deploy this migration at the same time as the migrations mentioned in 0.18.0
.
Fixes
Miscellaneous
- Update CONTRIBUTING.rst: add info on rebuilding docs (#380)
Kudos:
0.18.1: Bugfixes¶
Released on 2021-01-13 - GitHub - PyPI
0.18.1
, consider deploying 0.18.2
instead, as its migrations contain a fix for a 0.18.0
migration that could cause some bugs.
Migrations
No migrations in bugfix releases.
Fixes
Kudos:
0.18.0: Log format & auto-delete finished jobs¶
Released on 2021-01-08 - GitHub - PyPI
Migrations
- https://github.com/peopledoc/procrastinate/blob/master/procrastinate/sql/migrations/00.16.00_01_add_finish_job_and_retry_job_functions.sql (this migration was named 0.16 but should have been named 0.17)
- https://github.com/peopledoc/procrastinate/blob/master/procrastinate/sql/migrations/00.17.00_01_add_trigger_on_job_deletion.sql
- https://github.com/peopledoc/procrastinate/blob/master/procrastinate/sql/migrations/00.17.00_02_delete_finished_jobs.sql
- https://github.com/peopledoc/procrastinate/blob/master/procrastinate/sql/migrations/00.17.00_03_add_checks_to_finish_job.sql
- https://github.com/peopledoc/procrastinate/blob/master/procrastinate/sql/migrations/00.17.00_04_add_checks_to_retry_job.sql
0.18.2
. Please run the migrations mentioned in 0.18.0
and 0.18.2
as a bundle to avoid potential downtimes
Features
- Add async method to apply schema (#376)
- Add the ability to personalize log format by environment variable (#357)
- Second pass on log format (#361)
- Delete finished jobs (#354)
Bug Fixes
- Dev-env script improvement (#353)
- Fix InMemoryConnector handling of queueing_lock (#374)
- Fix the shell's "retry job" and "cancel job" actions (#356)
Documentation
- Add a "Retry stalled jobs" howto (#366)
- Change comments in the README's code snippets (#371)
- Fix README async example, make both
sync
andasync
example more complete (#368) - Fix README example (#365)
- Remove the Sphinx bug-related addendum in the doc (#351)
Miscellaneous
- Dev-env script improvement (#353)
- Fix dev-env (#362)
- CI on both PRs and the master branch (#373)
- CI: switch from Branch to PR (#358)
- Fix deployment pipeline (#360)
- Add @thomasperrot as codeowner (#359)
- Make the shell fixture properly terminate the shell process (#352)
- Remove Admin and move its methods to JobManager (#349)
- Split procrastinate_finish_job into two functions (#336)
Kudos:
0.17.0: Make migrations simpler & safer¶
Released on 2020-11-13 - GitHub - PyPI
Migrations
This version didn't actually add new migrations (but existing migrations were renamed)
A consequence of this, if you're using Django Migrations and ran migrations pre-0.17 is that one of the Django migrations was renamed, which confuses Django. Before running the Migrations for 0.17.0, you're invited to run the following Django code in the Django shell (manage.py shell
):
>>> from django.db.migrations.recorder import MigrationRecorder
>>> MigrationRecorder.Migration.objects.filter(app="procrastinate", name="0001_baseline").update(name="0001_initial")
Starting at this release, migrations can be run while the system runs, provided certain conditions are met.
See the migrations doc for more information.
Work on migrations:
- Use underscores in migration script names (#345)
- Document new rules for database migrations (#342)
- Rename SQL migrations (#347)
- Rename migration: wrong index number (#350)
- Django migrations: generate on the fly via import hooks (#340)
Breaking Changes
- Django migrations, see above.
procrastinate healthchecks
now doesn't report the number of jobs anymore. Useprocrastinate shell
for that.
Miscellaneous
- Adjust badges (#337)
- Rename Job Store > Job Manager (#335)
- Report test workflow success in Check API (#322)
- Don't test the PRs, just test the branches (#348)
- Ignore aiopg warnings that we can't do anything about (#338)
- Remove HealthCheckRunner, simplify healthchecks (#339)
Kudos:
0.16.0: Avoid Postgres deadlocks when deferring periodic jobs¶
Released on 2020-10-06 - GitHub - PyPI
Migrations
Features
- Auto-generating Django migrations using Django's own machinery (#298)
Bug Fixes
- Fix the procrastinate_defer_periodic_job SQL function (#329)
- Change name of short option for --listen-notifiy (#325)
- Fix the AppNotOpen exception message (#327)
Documentation
- Document how to make remove_old_jobs periodic (#326)
Miscellaneous
- Use setuptools-scm to get migration from Git (#319)
- Make test_run_log_current_job_when_stopping more robust (#317)
- Use postgres:12 image for faster tests (#315)
- Use migra instead of pum for the db migration tests (#308)
- Run the main workflow for other branches than master (#311)
- GitHub actions (#302)
- Simplify release-drafter PR process (#324)
Kudos:
@elemoine, @ewjoachim, @mgu and @thomasperrot
0.15.2: Fixing the release process again¶
Released on 2020-08-25 - GitHub - PyPI
Once again, this release is just a way for us to test the release process. Nothing changed in the code.
Migrations
None
Bugfixes
- Fix deployment in CI (#301)
Kudos:
0.15.1: Fixing the release process¶
Released on 2020-08-25 - GitHub - PyPI
OK, this release is just a way for us to test the release process. Nothing changed in the code.
Migrations
None
Bugfixes
- Trigger CI when publishing a new release (#300)
Kudos:
0.15.0: Improve periodic tasks¶
Released on 2020-08-25 - GitHub - PyPI
Migrations
Breaking changes
- It is now expected that connections are explicitly opened (and close): see documentation for the various ways of doing that. (#270)
Features
- You can now have a single periodic task be deferred multiple times on multiple queues (doc) (#296)
- Tasks (including periodic tasks) now accept default locks and queueing locks in the same way as it was accepting default queues (doc) (#296)
Bugfix
- Periodic tasks deferring won't be interrupted by long synchronous tasks (#296)
Miscellaneous
- Add github actions (#290)
- Badges (#299)
- Additional doc on periodic tasks - forgotten wording fix (#294)
Kudos:
0.14.0: Add Django support¶
Released on 2020-08-20 - GitHub - PyPI
Migrations
None
Features
- Django contrib app (#283)
Bug Fixes
- Fix the "every second periodic task" bug (#293)
Miscellaneous
Kudos:
Agate (ping @EliotBerriot), @t-eckert, @elemoine, @ewjoachim
0.13.0: Remove pendulum dependency¶
Released on 2020-07-17 - GitHub - PyPI
Migrations
None
Breaking changes
- Very slight possible breaking change: the code parsing dates when calling
procrastinate defer --at=<date>
has changed. If you were using ISO8601 strings, nothing changed. If you were using more exotic formats, we think that nothing changed, but we don't have a definitive proof of that, so here's a warning. See https://procrastinate.readthedocs.io/en/stable/howto/schedule.html?highlight=pendulum#from-the-code (#279)
Miscellaneous
- Use python-dateutil to parse date (#279)
Kudos:
0.12.1: Add missing SQL index¶
Released on 2020-07-17 - GitHub - PyPI
Migrations
Bug Fixes
- Add missing index to procrastinate_periodic_defers (#277)
Miscellaneous
- Adapt to new isort 5 (#275)
Kudos:
0.12.0: Periodic tasks¶
Released on 2020-07-06 - GitHub - PyPI
Migrations
Features
- Add a periodic task (cron) system (#240)
- Add task aliases, letting you safely rename a task without loosing existing backlog (#264)
Miscellaneous
Kudos:
0.11.0: Fix race condition, improve resource usage¶
Released on 2020-06-23 - GitHub - PyPI
Migrations
- https://github.com/peopledoc/procrastinate/blob/master/procrastinate/sql/migrations/delta_0.10.0_001_close_fetch_job_race_condition.sql
- https://github.com/peopledoc/procrastinate/blob/master/procrastinate/sql/migrations/delta_0.10.0_002_add_defer_job_function.sql
Breaking changes
- If you created an
AiopgConnector
withmaxsize=0
or1
, it used to change it to 2. Now it won't.0
should really be avoided.1
will disable the listen/notify feature. See doc.
Features
- Synchronous programs can now define a
Psycopg2Connector()
and have real synchronous I/Os, likely to work better with multithreaded programs. See doc. (#237) - Default log message contains task result. This means you can
return <something>
in your task to make this<something>
appear in your logs (#252) - Make listen/notify optional, through
listen_notify=False
in your worker configuration (#258)
Bug Fixes
- Close race condition in procrastinate_fetch_job (#231)
- Retry on "server closed connection unexpectedly" errors (#259)
- Synchronous closing for AiopgConnector (#263)
- Add task.defer as an explicit sync method (#257)
Miscellaneous
- Documentation "Quickstart" section was full of imprecisions (#254)
- Display test results & simplify Tox setup (#253)
- Add function procrastinate_defer_job (#232)
- CONTRIBUTING.rst: more precise wording on release automated steps (#248)
- Update release-drafter.yml (#245)
Kudos:
@elemoine and @ewjoachim
0.10.0: Fix that lock bug¶
Released on 2020-06-12 - GitHub - PyPI
A bug (#236) since 0.7.1 was preventing the listen-notify feature from working correctly.
Migrations
None
Bug Fixes
- Create "set pool" lock lazily (#236)
Miscellaneous
- Improve release-drafter settings (#243)
- Add a github action to get automated changelogs (#239)
- Change editions to edits in CONTRIBUTING (#244)
- Make setup.py work against lightweight tags (#234)
- Improve job defer logs (#233)
Kudos:
@elemoine and @ewjoachim
0.9.0: Queueing lock¶
Released on 2020-06-05 - GitHub - PyPI
Breaking changes
-
Rename PostgresConnector into AiopgConnector (#225):
The class
PostgresConnector
becameAiopgConnector
. The only change is the name.
Migrations
Features
-
Add notion of "queueing lock" (#219):
Queueing locks can ensure periodic jobs do not accumulate in the queue: at any given time, only a single job with a given queueing lock can be waiting.
See https://procrastinate.readthedocs.io/en/latest/howto/cron.html#launch-a-task-periodically
Documentation
- Fix PostgreSQL docker example in quickstart doc (#230) (Thanks @tmartinfr!)
Miscellaneous
- Code improvements around Procrastinate Admin module (#224)
0.8.1: Fix Travis autodeploy !¶
Released on 2020-05-29 - GitHub - PyPI
Now, the release process is as documented.
0.8.0: Concurrent tasks and administration shell¶
Released on 2020-05-29 - GitHub - PyPI
Breaking changes
- None \o/ (that we know of)
Migrations
Features
- Refactor builtin tasks to use pass_context #205
- Real concurrent asynchronous tasks #206
- Implement an administration prompt #204
Fixes
- Worker should instantiate Event lazily, and should use wait_for, not wait #202
- Insert event after defer job #184
Tests
- Activate test_lock #210
- Add a schema migration test #209
- Instrument test_lock in case it fails again #214
- Simplify migration tests #215
Docs
- Fix connector doc & worker doc (& probably other docs too) #208
- Add migration tests to contributing doc #211
- Fix typo in locks howto #216
Misc
- Remove extraneous spaces in license file #218
0.7.1: Fix migration script¶
Released on 2020-04-29 - GitHub - PyPI
Fixes
Change CREATE FUNCTION
to CREATE OR REPLACE FUNCTION
in the delta_0.6.0_001_fix_procrastinate_fetch_job.sql
migration script.
0.7.0: Cleaning Postgres Connector¶
Released on 2020-04-27 - GitHub - PyPI
Migrations
Features
Postgres Connector
Breaking compatibility
Now, to setup your postgres connector you can do:
connector = procrastinate.PostgresConnector(
dsn="postgres://user:password@host:port/dbname"
)
# or if you already have an aiopg pool:
connector = procrastinate.PostgresConnector()
connector.set_pool(my_pool)
Associated PRs:
- Remove PostgresJobStore (compatibility layer) #188
- Create aiopg pool lazily #185
- Use a pool instead of a single connection, and reorganize the worker around that #173
Docker
- Adding a first version of dockerized development environment. #144
- add POSTGRES_PASSWORD to docker-compose.yml and in contributing documentation #177
Logs
Migrations
- Renaming Migrator as SchemaManager #161
- Derive schema version from migration scripts #162
- Improve our migration story #167
Documentation
- Reword migration section of contributing guide #168
- Add a "Set database schema" how-to #169
- Add a "Use Pum for migrations" how-to #170
Misc., including process changes
0.6.0: Migrations¶
Released on 2020-03-27 - GitHub - PyPI
Migrations
- Add a "Use Pum for migrations" how-to #170
- Add a "Set database schema" how-to #169
- Reword migration section of contributing guide #168
- Improve our migration story #167
- Fix builds 164 #165
- Derive schema version from migration scripts #162
- (internal) Renaming Migrator as SchemaManager #161
The rest
0.5.0: Handling connection¶
0.4.0: From Job Store to Connector ¶
Released on 2020-02-14 - GitHub - PyPI
Breaking changes
App
is now initialized with a PostgresConnector
object instead of a PostgresJobStore
.
Change your code from:
app = procrastinate.App(job_store=procrastinate.PostgresJobStore(dsn="..."))
to
app = procrastinate.App(connector=procrastinate.PostgresConnector(dsn="..."))
Changelog
- Change PostgresJobStore to Pos #147
- Retry on specific exception type 84 #135
- Add name attribute to workers and print it in the logs #132
- New main contributors #138
- First monitor and corresponding cli command #129
- Custom JSON encoders and decoders #131
- Typo fix and a missing sentance in the doc. #136
- Set enable_uuid to False when calling aiopg.connect #134
- Fix bug in get_connection #130
- Make two tests in test_testing async #128
- Use asyncio.TimeoutError #125
- Quick improvement of logic flow #121
- Remove the Task name/full_path warning #123
- Fix/improve quickstart #120
- Fix "docker-compose" in contributing doc #122
- Add @sophie-ulti to the codeowners #116
- add *.pyc to gitignore #115
0.3.0: We’re going async !¶
Released on 2019-11-29 - GitHub - PyPI
- Don't overwrite psycopg2 adapters when creating the connection (#113)
- A pass on the contributing doc (#109)
- Procrastinate's core has become async, and it's now quite easier to support sync and async projects (#96)
- Documentation spell checker integrated in the project (#77)
- Fix race conditions (#104)
- Improve SQL schema (#107)
0.2.1: Metadata update¶
Released on 2020-02-07 - GitHub - PyPI
- Fixing long description on PyPI (#97)
0.2.0: Ground work¶
Released on 2020-02-07 - GitHub - PyPI
- Launch tasks when they're corountines (but still sequentially) (#93)
- Make it possible to launch tasks not defined in the project (#91)
- Add apt install of postgresql-client in the contributing page (#90)
- Fix multiple doc issues (#89)
- Query system. Now the connector is agnostic of the queries it runs (#83)
- Renaming things (#81)
- All sql queries in an SQL file, and a system to turn a query into a function (#71)
- Add Codeowners and PR template (#73)
- Add more granular tests to cli, and fix tests that actually didn't test anything (#69)
- Save job events in the DB (#70)
- Add linear and exponential backoff (#64)
- Merge pull request #63 from peopledoc/split-howto
- Wording, documentation & doc review, typos (#58, #72, #74, #75, #76, #78)
0.1.1: Documentation, packaging, licensing¶
Released on 2019-08-18 - GitHub - PyPI
- Documentation, packaging, licensing
0.1.0: First release on PyPI¶
Released on 2019-08-15 - GitHub - PyPI
- First release on PyPI