Skip to content

akostrikov/trunk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trunk

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'

Setup

You will need to create a new table and add two functions to your database. See table.sql and ddl.sql.

About

Making postgres listen/notify easier.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 86.7%
  • PLpgSQL 13.3%