Skip to content

3.12.0

Latest

Choose a tag to compare

@ewjoachim ewjoachim released this 19 Nov 00:19
· 48 commits to main since this release
Immutable release. Only release title and notes can be modified.
0a47a4c

Highlights

  • Breaking: Python 3.10 is no longer supported, Python 3.15 is (#1660)
  • Alembic: if your project manages its schema with Alembic, add procrastinate.contrib.alembic:versions to your version_locations (pip install "procrastinate[alembic]"). See With Alembic (#1584)
  • Lock modes: lock_mode="mutex" keeps jobs sharing a lock from running at the same time, without letting a job scheduled for later hold up the others. See Locks (#1606)
  • Much faster fetching with locks: the lock check of the fetch query now uses an index. With 100k waiting jobs that have a lock, fetching one went from 237 ms to 2 ms with 16 workers, and from 3.7 ms to 0.3 ms with one (#1677). A worker also picks the next job sharing a lock as soon as the previous one completes, instead of at its next poll (#1676)
  • Timezones for periodic tasks: @app.periodic(cron="0 9 * * *", tzinfo="Europe/Paris"). See Periodic tasks (#1474)
  • Worker shutdown is more reliable: heartbeat kept while draining, aborts during shutdown, stuck fetches and listeners (#1585, #1603, #1605, #1668, #1670)
  • The in-memory testing connector now handles retries, aborts and finishes like Postgres does, which may surface tests that relied on the old behaviour (#1663)

Migrations

Pre (launch before upgrading):

Post (launch after upgrading):

Note

03.12.00_03 and 03.12.00_51 use CONCURRENTLY and can't run inside a transaction: apply them on their own. Django migrations and Alembic revisions handle this already.

Note

The 3.11.0 release notes forgot to list its pre-migration, 03.11.00_01_pre_fetch_job_skip_null_lock.sql. If you apply the SQL scripts yourself and skipped it, nothing is broken: it only made fetching faster for jobs without a lock, and 03.12.00_01_pre_add_lock_mode.sql includes the same change, so there's nothing to catch up on.

What's Changed

Features

Bug Fixes

  • Run sync external connections directly when the async pool is open by @jihokim-tibero in #1659
  • Keep monitoring side tasks after one returns cleanly by @Sanjays2402 in #1605
  • Fix job abortion during worker graceful shutdown by @owenh000 in #1603
  • Fail a doing job on retry when a queueing lock sibling is waiting by @jihokim-tibero in #1657
  • Don't depend on parsing Postgres error messages for queueing locks by @ewjoachim in #1669
  • Give up on a stuck fetch when the worker is asked to stop by @ewjoachim in #1668
  • Stop listening when cancelled, even if the driver swallowed it by @ewjoachim in #1670
  • Keep the timezone offset of --at datetimes that are not strict ISO-8601 by @fedshaft in #1673
  • Wake the worker when a locked job completes by @loispostula in #1676
  • Add a (lock) index for the fetch_job_v2 lock check by @vipierozan99 in #1677

Miscellaneous

Documentation

  • Update retry.md to use correct task property in example by @Chadys in #1655

Dependencies

Uncategorized

  • Keep heartbeat alive during graceful shutdown by @sebdiem in #1585

New Contributors

Full Changelog: 3.11.0...3.12.0