Postgres-based distributed task processing library
Project description
procrastinate
Kind of like Celery but based on elephants (Postgres) instead of rabbits (RabbitMQ)
Currently very alpha stage.
Database creation
Launch a postgres DB the way you want, e.g. using docker:
$ docker-compose up -d
$ export PGDATABASE=procrastinate PGHOST=localhost PGUSER=postgres
$ createdb && psql -v ON_ERROR_STOP=ON -f init.sql
Installation for development
procrastinate officially is compatible with Python 3.6
and above, using Postgres 10.
$ pip install -r requirements.txt
You may need to install some required packages for psycopg:
$ apt install libpq-dev python-dev
Testing
With a running database, in the dev virtualenv:
$ pytest
Code cleaning
In the dev virtualenv, before commiting:
$ black .
$ pylint .
$ isort
Demo usage
With a running database, in the dev virtualenv:
Launch a worker
$ python -m procrastinate_demo worker sums
$ python -m procrastinate_demo worker products
Schedule some tasks
$ python -m procrastinate_demo client
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
procrastinate-0.1.0.tar.gz
(19.3 kB
view hashes)
Built Distribution
Close
Hashes for procrastinate-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5032ad97ded5f7900d5f53bc8aa24d0be19be41a094ebb5e3ef1d1caf6f27dad |
|
MD5 | b31842594a148eedf26f13d0d6aed397 |
|
BLAKE2b-256 | 133a80801eb12a63d0e38f94e930bf96a68e7731612ae3ec1a6d1ca0b0066d60 |