Repository navigation
·
48 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
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:versionsto yourversion_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):
- 03.12.00_01_pre_add_lock_mode.sql
- 03.12.00_02_pre_retry_job_fail_on_queueing_lock_conflict.sql
- 03.12.00_03_pre_add_todo_doing_lock_index.sql
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
- Add lock mode by @al1ve1t in #1606
- added timezone support for cron schedules in periodic tasks by @dreackm in #1474
- Let list_jobs filter on several job ids by @ewjoachim in #1672
- Include alembic migrations by @sebdiem in #1584
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
- Make publish depend on acceptance tests by @ewjoachim in #1661
- Make worker-stop deadlines in tests actually fail by @ewjoachim in #1662
- Align InMemoryConnector job transitions with the SQL by @ewjoachim in #1663
- Filter jobs before looking at events in delete_old_jobs by @jihokim-tibero in #1658
Documentation
Dependencies
- Upgrade Python: add py3.15, remove py3.10 by @ewjoachim in #1660
Uncategorized
New Contributors
- @jihokim-tibero made their first contribution in #1659
- @Chadys made their first contribution in #1655
- @Sanjays2402 made their first contribution in #1605
- @owenh000 made their first contribution in #1603
- @sebdiem made their first contribution in #1585
- @al1ve1t made their first contribution in #1606
- @dreackm made their first contribution in #1474
- @fedshaft made their first contribution in #1673
- @loispostula made their first contribution in #1676
Full Changelog: 3.11.0...3.12.0