Changelog

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