Skip to content

Releases: procrastinate-org/procrastinate

3.0.0b1

12 Jan 15:52
9cefcde
Compare
Choose a tag to compare
3.0.0b1 Pre-release
Pre-release

What's Changed

Breaking changes

A long, complex, necessary and highly appreciated work from @onlyann who has been quite active this year: rewriting most of the main job processing loop of the Procrastinate Worker (#1114) as discussed in #933. It was followed by quite a few improvements we wanted to make for a long time and took the opportunity of a breaking release to do, as described below.

Changes include:

  • The migration process has changed, especially if you apply migrations while the application is running. The way it was before was that you had to apply the migrations that came with version X.Y.Z before upgrading the code to X.Y.Z with complex procedures around minor/major versions. The new way is that migrations are noted as pre or post, you apply the pre migrations before deploying the accompagnying new version of Procrastinate, and you apply the post migrations after deploying the said code. If you are several versions late, you'll have to repeat these for every intermediate release that comes with migrations. See the Migration documentation.
  • Aborted asynchronous jobs are now cancelled through asyncio's cancel method, which can be handled gracefully by users using shielding, as explained in the Cancel documentation. Synchronous jobs will not be cancelled, but job_context.should_abort() will return True so that you can handle the abortion request in your code.
  • A better graceful stopping mechanism with a timeout controlled by shutdown_graceful_timeout. During shutdown, jobs (both synchronous and asynchronous) get an abort request as described in the previous bullet point. See all details in the Shutdown documentation.
  • The way a job's abortion request is stored used to be part of the job's status (ABORTING). It's now an independent field (Job.abort_requested). This has implications if you introspect job states, such as with the Job objects or via the Django integration.
  • The timeout worker option was renamed to fetch_job_polling_interval to better reflect its purpose. It's accompanied by a new setting abort_job_polling_interval. Both regulate how often the worker contacts the database to request new jobs or cancellation requests, in case they don't receive notifications from the LISTEN/NOTIFY mechanism. This is explained in the Polling documentation. Note that the work from @onlyann led to workers making significantly less SQL queries, especially for workers with high concurrency settings.
  • There have been a few changes on the JobContext object that your tasks receive if the task decorator was passed with pass_context=True:
    • job_context.job_result was removed. The only relevant information it contained was the start timestamp, which is now accessible via job_context.start_timestamp
    • The attributes app and job had static typing, mentioning that those attributes could be None while they actually were always set. They are now properly typed.
    • job_context.should_abort_async() was removed. Knowing whether the job should abort or not, is not doing I/Os anymore, so both sync and async code can now use job_context.should_abort(). job_context.abort_reason tells you whether a job is being aborted because the user requested an abortion, or because the worker is stopping.
    • The job_context.task attribute is now a read-only property. Not that it wasn't a good idea to modify it before, but in the very surprising case that one would do, that's now not possible anymore.
  • In the arguments of builtin_tasks.remove_old_jobs(), remove_error was renamed to remove_failed for consistency. Similarly, in JobManager.delete_old_jobs(), include_error was renamed include_failed.
  • Support for Python 3.8 was removed following its deprecation.

Bug Fixes

Related PRs:

Miscellaneous

Documentation

Dependencies

Kudos

MVPs

  • Special thanks to @onlyann who has brought significant changes and helped us bring a lot of the good stuff you can see in this release.
  • Never-ending stream of kudos to @medihack who stepped up as a maintainer and has been an excellent steward & force for good to the project.

New contributors for this release

Feedback

We'd love for you to share your thoughts about this release to us:

  • Was the upgrade simple enough? Were these release notes detailed enough? Was the timing good? What do you think of the project and its updates? In the future, would you prefer new features or more stability? Please feel free to chime in in the discussion accompanying this release to make your voice heard.

Full Changelog: 2.14.0...3.0.0b1

2.15.1

26 Nov 12:48
dd619a0
Compare
Choose a tag to compare

What's Changed

Miscellaneous

Documentation

New Contributors

Full Changelog: 2.15.0...2.15.1

2.15.0

19 Oct 11:47
98fd11e
Compare
Choose a tag to compare

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

08 Oct 09:25
3ebbe2b
Compare
Choose a tag to compare

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

Full Changelog: 2.14.0...2.14.1

2.14.0

19 Sep 21:48
70509f4
Compare
Choose a tag to compare

Migrations

None

What's Changed

Miscellaneous

Documentation

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

19 Aug 18:57
0bed3ef
Compare
Choose a tag to compare

Migrations

None

What's Changed

Bug Fixes

Miscellaneous

Documentation

  • Remove sphinx-autodoc-typehints, upgrade Myst & Sphinx by @ewjoachim in #1153

Full Changelog: 2.13.1...2.13.2

2.13.1

15 Aug 22:15
7f69c10
Compare
Choose a tag to compare

Migrations

None

What's Changed

Bug Fixes

Full Changelog: 2.13.0...2.13.1

2.13.0

15 Aug 15:08
3629782
Compare
Choose a tag to compare

Migrations

None

What's Changed

Bug Fixes

Full Changelog: 2.12.0...2.13.0

2.12.0

14 Aug 16:30
e5197a9
Compare
Choose a tag to compare

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

09 Aug 08:53
112f2c8
Compare
Choose a tag to compare

Migrations

None

What's Changed

Miscellaneous

  • Make django Admin interface support much better UX-wise by @ticosax in #1140

Full Changelog: 2.10.0...2.11.0