Skip to main content

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)

Uploaded Source

Built Distribution

procrastinate-0.1.0-py3-none-any.whl (15.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page