Skip to main content

Integration of Django with dramatiq-pg

Project description

dramatiq-pg integration for django

Installation

  1. Install with pip

    $ pip install django-dramatiq-pg
  2. Add to your INSTALLED_APPS list in settings.py

    INSTALLED_APPS = [
        ...
        'django_dramatiq_pg',
    ]
  3. Configure the Database

    DRAMATIQ_BROKER = {
        "OPTIONS": {
            "url": "postgres:///mydb",
        },
        "MIDDLEWARE": [
            "dramatiq.middleware.TimeLimit",
            "dramatiq.middleware.Callbacks",
            "dramatiq.middleware.Retries",
        },
    }
  4. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-dramatiq-pg-1.0.2.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

django_dramatiq_pg-1.0.2-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file django-dramatiq-pg-1.0.2.tar.gz.

File metadata

  • Download URL: django-dramatiq-pg-1.0.2.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.7.7

File hashes

Hashes for django-dramatiq-pg-1.0.2.tar.gz
Algorithm Hash digest
SHA256 67639fcfb25fa691a130ec7a5e960f804ba7ba8d42300a1e551bc44a70c0cc37
MD5 bee8d04c1ac73079525c33eeb50556c8
BLAKE2b-256 c4cd58dabed2a54dabe82d4a7a0c7c6b38031a728ce0c7ca387585ab92a054af

See more details on using hashes here.

Provenance

File details

Details for the file django_dramatiq_pg-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: django_dramatiq_pg-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.7.7

File hashes

Hashes for django_dramatiq_pg-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a5d0d26887eaf9d5ae4c9f9c53e959f482f9c6f42e08f92dd5be7e1c0683e940
MD5 716297b41a412f62247aa5859f0ecc76
BLAKE2b-256 f857da26715b71d02d5f5821c391191bdfdf5cc41c798500919ecc72c7684d6c

See more details on using hashes here.

Provenance

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