This repository was archived by the owner on Jan 10, 2019. It is now read-only.
Description Hi.
I'm getting an exception using thoonk with publish/subscribe. I'm using FreeBSD, Python 2.6.7 and redis 2.2.11.
What am I doing wrong? Thanks!
$ pip freeze | grep redis
hiredis==0.1.0
redis==2.2.4
$ pip freeze | grep thoonk
-e git+https://github.com/andyet/thoonk.py.git@2ba5592da65357313ecddbbf041b28183c95c0c0#egg=thoonk-dev
$ python
>>> import redis
>>> r = redis.Redis(db=10)
>>> r.flushdb()
>>> ^D
$ cat test_thoonk.py
#!/usr/bin/env python
import thoonk
def publish_handler(feedname, item, id):
print 'test'
def main():
foo = thoonk.Thoonk(db=10, listen=True)
foo.register_handler('publish_notice', publish_handler)
feed = foo.feed('test')
feed.publish('1')
feed.publish('23')
feed.publish('42')
if __name__ == '__main__':
main()
$ python test_thoonk.py
test
test
Exception in thread Thread-1 (most likely raised during interpreter shutdown):$
Reactions are currently unavailable
Hi.
I'm getting an exception using thoonk with publish/subscribe. I'm using FreeBSD, Python 2.6.7 and redis 2.2.11.
What am I doing wrong? Thanks!