Integration of Django with dramatiq-pg
Project description
dramatiq-pg integration for django
Installation
Install with pip
$ pip install django-dramatiq-pg
Add to your INSTALLED_APPS list in settings.py
INSTALLED_APPS = [ ... 'django_dramatiq_pg', ]
Configure the Database
DRAMATIQ_BROKER = { "OPTIONS": { "url": "postgres:///mydb", }, "MIDDLEWARE": [ "dramatiq.middleware.TimeLimit", "dramatiq.middleware.Callbacks", "dramatiq.middleware.Retries", }, }
Start the worker process:
$ dramatiq django_dramatiq_pg.worker
This worker module will auto-discover any module called ‘actors’ in INSTALLED_APPS.
Settings
This package attempts to retain backward compatibility with django-dramatiq settings, but ingores the BROKER key for DRAMATIQ_BROKER.
See https://github.com/Bogdanp/django_dramatiq for more details.
- DRAMATIQ_BROKER
A dict of options to pass when instantiating the broker.
- DRAMATIC_BROKER[‘OPTIONS’]
Arguments to pass to the Broker.
- DRAMATIC_BROKER[‘MIDDLEWARE’]
A list of middleware classes to be passed to the broker.
These can either be import strings, or instances.
- DRAMATIQ_ENCODER
Default: None
Import path for encoder class.
- DRAMATIQ_ACTORS_MODULE
Default: ‘actors’
Name of module use to auto-discover actors in INSTALLED_APPS.
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
Built Distribution
Hashes for django_dramatiq_pg-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5d0d26887eaf9d5ae4c9f9c53e959f482f9c6f42e08f92dd5be7e1c0683e940 |
|
MD5 | 716297b41a412f62247aa5859f0ecc76 |
|
BLAKE2b-256 | f857da26715b71d02d5f5821c391191bdfdf5cc41c798500919ecc72c7684d6c |