跳转到主要内容

使postgres监听/通知更容易。

项目描述

安装

要安装

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")

Celery

Trunk提供了一个Kombu传输,允许您使用Trunk与Celery一起使用,要这样做,请使用以下配置Celery:

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

设置

您需要创建一个新表并向数据库中添加两个函数。请参阅table.sqlddl.sql

项目详情


下载文件

下载适用于您的平台文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源分布

trunk-0.3.0.tar.gz (4.1 kB 查看散列)

上传时间:

由以下机构支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面