Skip to main content
Help improve PyPI by participating in a 5-minute user interface survey!

``pq`` wrapper for django

Project Description

pq wrapper for django.

https://travis-ci.org/jeanphix/dj-pq.svg?branch=master

Installation

pip install dj-pq

Configuration

Add dj_pq to your INSTALLED_APPS:

INSTALLED_APPS += [
    'dj_pq',
]

Apply migrations:

./manage.py migrate

Usage

dj-pq exposes the pq tasks API.

from dj_pq import get_queue

queue = get_queue('notifications')

@queue.task()
def notify(user_id):
    User.objects.get(id=user_id).notify()

notify(42)

Optionally a Queue can be bound to a specific database connection:

queue = get_queue('notifications', 'another_connection')

A worker command allows to start a worker for a given queue:

./manage.py worker notifications

Release history Release notifications

This version
History Node

1.4.2

History Node

1.4.1

History Node

1.4

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
dj-pq-1.4.2.tar.gz (3.2 kB) Copy SHA256 hash SHA256 Source None Mar 30, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page