使Postgres更容易收听/通知。
trunk的Python项目详细描述
安装
要安装:
pip install trunk
用法
trunk尽量简单
t = Trunk("postgres://localhost/noclue") for channel, payload in t.notifications("clues"): print channel, payload t.notify("clues", "chandelier") t.unlisten("clues")
芹菜
中继提供Kombu传输, 它允许您使用trunk和Celery, 为此,请使用以下命令配置芹菜:
BROKER_URL = 'trunk.transport.Transport://localhost/database'