python-zk / kazoo

Kazoo is a high-level Python library that makes it easier to use Apache Zookeeper.
https://kazoo.readthedocs.io
Apache License 2.0
1.3k stars 387 forks source link

async callback does not work #564

Closed dubingchao closed 5 years ago

dubingchao commented 5 years ago

hi i am using gevent with kazoo, i am doing exactly as the async example ,but get nothing,the callback does not work,even not simply print any word,such as 123,please help! code as below:

import sys

from kazoo.exceptions import ConnectionLossException from kazoo.exceptions import NoAuthException

def my_callback(async_obj): try: children = async_obj.get() print 123 except (ConnectionLossException, NoAuthException): sys.exit(1)

async_obj = zk.get_children_async("/some/node") async_obj.rawlink(my_callback)

dubingchao commented 5 years ago

solved by attemping to downgrade gevent to 1.2.0. may be the latest version of gevent not fitted well.

StephenSorriaux commented 5 years ago

Thanks for your feedback.