Skip to main content

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

Download files

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

Source Distribution

dj-pq-1.4.2.tar.gz (3.2 kB view details)

Uploaded Source

File details

Details for the file dj-pq-1.4.2.tar.gz.

File metadata

  • Download URL: dj-pq-1.4.2.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for dj-pq-1.4.2.tar.gz
Algorithm Hash digest
SHA256 d14f7e6d2f3661a38bd3539d0b45dea77a047e6990a7ee2d6f205f5f4c562aed
MD5 f72c494ebfac185003f589d239c9dd2d
BLAKE2b-256 4b46f71d4762a3153a689c88ac7a153c8ba4e265409aee4ab0c70027ceb0b19b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.4.2 This release

1 file

1.4.1

1 file

1.4

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page