Making postgres listen/notify easier.
To install :
pip install trunk
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")
BROKER_URL = 'trunk.transport.Transport://localhost/database'
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.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size trunk-0.2.1.tar.gz (3.8 kB)||File type Source||Python version None||Upload date||Hashes View|