Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (21 sloc) 781 Bytes
import os
from kazoo.zkclient import ZooKeeperClient
from kazoo.client import KazooClient
__all__ = ['ZooKeeperClient', 'KazooClient']
# ZK C client likes to spew log info to STDERR. disable that unless an
# env is present.
def disable_zookeeper_log():
import zookeeper
if not "KAZOO_LOG_ENABLED" in os.environ:
def patch_extras():
# workaround for
# gevent isn't patching threading._sleep which causes problems
# for Condition objects
from gevent import sleep
import threading
threading._sleep = sleep
if "KAZOO_TEST_GEVENT_PATCH" in os.environ:
from gevent import monkey; monkey.patch_all()