Skip to main content

Making postgres listen/notify easier.

Project description

Installing

To install :

pip install trunk

Usage

Trunk tries to be as simple as possible

t = Trunk("postgres://localhost/noclue")
for channel, payload in t.notifications("clues"):
    print channel, payload
t.notify("clues", "chandelier")
t.unlisten("clues")

Celery

Trunk provides a Kombu transport, that allows you to use trunk with Celery, to do so, configure Celery with :

BROKER_URL = 'trunk.transport.Transport://localhost/database'

Limitations

For now, and since LISTEN/NOTIFY behavior is not strictly speaking a queue, if you have more than one celery worker (but you can use worker concurrency), each worker will receive every job send.

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

trunk-0.2.0.tar.gz (3.8 kB view hashes)

Uploaded Source

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