Changelog#

2.2.0#

Released on 2024-04-17 - GitHub - PyPI

What's Changed

Features

  • Run procrastinate shell <subcommand> for non-interactive lookups by @indrat in #1038

Miscellaneous

Documentation

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

Miscellaneous

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

Miscellaneous

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

New Contributors

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

New Contributors

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

Bug Fixes

Miscellaneous

Documentation

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 use procrastinate.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 in INSTALLED_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 an App 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

Features

Bug Fixes

Miscellaneous

Documentation

New Contributors

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

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

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

Documentation

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

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

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

Miscellaneous

Docs

New Contributors

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 use procrastinate.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 in INSTALLED_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 an App 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:

Full Changelog: 1.1.2...2.0.0

1.1.2#

Released on 2024-01-23 - GitHub - PyPI

Migrations:

What's Changed

Bug Fixes

Miscellaneous

Full Changelog: 1.1.1...1.1.2

1.1.1#

Released on 2024-01-17 - GitHub - PyPI

Migrations

None

What's Changed

Bugfixes

Miscellaneous

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

Misc

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

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 use asgiref'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 and Psycopg2 connectors are now contrib. To use them, you'll need to import them with from procrastinate.contrib.aiopg import AiopgConnector and from procrastinate.contrib.psycopg2 import Psycopg2Connector. Also, the dependencies to aiopg and psycopg2 are now optional: use pip install procrastinate[aiopg] or pip install procrastinate[psycopg2] (or pip install procrastinate[aiopg,psycopg2] for both)
  • The main supported connector is now the PsycopgConnector that uses Psycopg 3 (and SyncPsycopgConnector). Please note that PsycopgConnector accepts parameters based on psycopg_pool.ConnectionPool, which has a slightly different signature from the psycopg2/aiopg counterpart, the main difference is that the connection arguments are now passed as PsycopgConnector(kwargs={"host": "..."}) (instead of AiopgConnector(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 (or AiopgConnector), 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 became check_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 and Psycopg2 connectors are now contrib. To use them, you'll need to import them with from procrastinate.contrib.aiopg import AiopgConnector and from procrastinate.contrib.psycopg2 import Psycopg2Connector. Also, the dependencies to aiopg and psycopg2 are now optionnal: use pip install procrastinate[aiopg] or pip install procrastinate[psycopg2] (or pip install procrastinate[aiopg,psycopg2] for both)
  • The main supported connector is now the PsycopgConnector that use Psycopg 3 (and SyncPsycopgConnector)
  • 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 (or AiopgConnector).
  • 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:

@ashleyheath

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:

@ashleyheath

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:

@aleksandr-shtaub

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:

@ashleyheath

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 and App.check_connection. The AsyncConnector 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 use asyncio.run or asgiref.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 way
    • App.run_worker has been reimplemented on top of App.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() and atexit (from the standard lib). YMMV.
    • For app configured with a sync connectors, use app.open() and app.close() (or with app.open()). With an async connector, use await app.open_async() and await app.close_async() or async with app.open_async(). Calling app.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

Kudos:

@ashleyheath

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

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

  • Lock file maintenance (#688)
  • [pre-commit.ci] pre-commit autoupdate (#689)

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

Kudos:

@abe-winter

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.

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

Miscellaneous

  • Remove assert in real code (#535)
  • Fix a few typos in the docs by @benjamb (#563)

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

@benjamb

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

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:

@aleksandr-shtaub

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:

@tomdottom, @elemoine, @ewjoachim

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 like Task at {task_name} was not registered, it's been loaded dynamically. (with log action load_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

  • Nitpick on worker.py (#448)
  • Fix docstring and Psycopg2Connector init signature (#447)

Process

Kudos:

@mecampbellsoup and @tomdottom

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

Kudos:

@elemoine, @ioben, and Mickaël Guérin

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

  • Small fix for dev-env script (#387)
  • Fix the async howto (#388)

Miscellaneous

  • Small fix for dev-env script (#387)
  • Update PR template (#389)

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

  • Fix finish_job compatibility issue (#383)
  • Do not raise in the BaseConnector destructor (#385)

Miscellaneous

  • Update CONTRIBUTING.rst: add info on rebuilding docs (#380)

Kudos:

@BracketJohn

0.18.1: Bugfixes#

Released on 2021-01-13 - GitHub - PyPI

⚠️ If you plan to deploy 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

  • add todo check for queueing lock, add test for todo check (#379)
  • Fix doc parts (#377)

Kudos:

@BracketJohn and @tmartinfr

0.18.0: Log format & auto-delete finished jobs#

Released on 2021-01-08 - GitHub - PyPI

Migrations

⚠️ These migration contain an incompatibility that is resolved in 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 and async 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:

@BracketJohn, @ignaciocabeza, @mxd4

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. Use procrastinate 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:

@elemoine, @ewjoachim and @thomasperrot

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:

@thomasperrot

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:

@thomasperrot

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:

@ewjoachim and @thomasperrot

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

  • Fix quickstart documentation (#285)
  • Additional doc on periodic tasks (#291)
  • Dev env script (#284)

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

Miscellaneous

  • Use python-dateutil to parse date (#279)

Kudos:

@EliotBerriot

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:

@ewjoachim, @anayrat

0.12.0: Periodic tasks#

Released on 2020-07-06 - GitHub - PyPI

Migrations

Features

Miscellaneous

  • Add py.typed to package (#272)
  • Add missing documentation on arguement retry_exceptions (#271)

Kudos:

@SBillion, @elemoine, @ewjoachim and @tmartinfr

0.11.0: Fix race condition, improve resource usage#

Released on 2020-06-23 - GitHub - PyPI

Migrations

Breaking changes

  • If you created an AiopgConnector with maxsize=0 or 1, 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 became AiopgConnector. The only change is the name.

Migrations

Features

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

  • add log formatting when deffering a task #117
  • Small second pass on logs #159

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

  • Fix setup.py #174
  • Fix builds 164 #165
  • Fix mypy errors #172
  • Rewrite travis.yml file #179
  • Closes instead of Cf. in PR template #180
  • Remove the procrastinate_jobs.started_at column #145
  • Add official support for Python 3.8 #178

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

  • Remove the procrastinate_jobs.started_at column #145
  • Small second pass on logs #159
  • 102: add log formatting when deffering a task #117

0.5.0: Handling connection#

Released on 2020-02-17 - GitHub - PyPI

  • Automated release process #146
  • Call close_connection from procrastinate_demo main #158
  • Acquire lock for connecting and executing queries #156

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="..."))

⚠️ We're going to change a few details around that in the next versions, if you want to avoid frequent changes and you don't need this release, it might be worth waiting for the next ones. We'll advertise when we thing the App API is likely stable.

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