zookeeper: do not hard depend on eventlet
Change-Id: Idadfc61c932bda6ab551dc941c8a53da990c6733
This commit is contained in:
parent
36655c68fe
commit
d096a0db87
|
@ -24,6 +24,3 @@ sysv-ipc>=0.6.8 # BSD License
|
||||||
kazoo>=2.2 # Apache-2.0
|
kazoo>=2.2 # Apache-2.0
|
||||||
pymemcache!=1.3.0,>=1.2.9 # Apache 2.0 License
|
pymemcache!=1.3.0,>=1.2.9 # Apache 2.0 License
|
||||||
redis>=2.10.0 # MIT
|
redis>=2.10.0 # MIT
|
||||||
|
|
||||||
# Ensure that the eventlet executor continues to operate...
|
|
||||||
eventlet!=0.18.3,>=0.18.2 # MIT
|
|
||||||
|
|
|
@ -19,7 +19,10 @@ import copy
|
||||||
|
|
||||||
from kazoo import client
|
from kazoo import client
|
||||||
from kazoo import exceptions
|
from kazoo import exceptions
|
||||||
from kazoo.handlers import eventlet as eventlet_handler
|
try:
|
||||||
|
from kazoo.handlers import eventlet as eventlet_handler
|
||||||
|
except ImportError:
|
||||||
|
eventlet_handler = None
|
||||||
from kazoo.handlers import threading as threading_handler
|
from kazoo.handlers import threading as threading_handler
|
||||||
from kazoo.protocol import paths
|
from kazoo.protocol import paths
|
||||||
from oslo_utils import encodeutils
|
from oslo_utils import encodeutils
|
||||||
|
@ -425,9 +428,12 @@ class KazooDriver(BaseZooKeeperDriver):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
HANDLERS = {
|
HANDLERS = {
|
||||||
'eventlet': eventlet_handler.SequentialEventletHandler,
|
|
||||||
'threading': threading_handler.SequentialThreadingHandler,
|
'threading': threading_handler.SequentialThreadingHandler,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if eventlet_handler:
|
||||||
|
HANDLERS['eventlet'] = eventlet_handler.SequentialEventletHandler
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Restricted immutable dict of handler 'kinds' -> handler classes that
|
Restricted immutable dict of handler 'kinds' -> handler classes that
|
||||||
this driver can accept via 'handler' option key (the expected value for
|
this driver can accept via 'handler' option key (the expected value for
|
||||||
|
|
Loading…
Reference in New Issue