Merge "Make zerorpc working with pyzmq > 13.0.2"
This commit is contained in:
commit
63f30e6694
@ -27,8 +27,9 @@ semver>=2.4.0
|
||||
# plugins
|
||||
stevedore>=1.5.0
|
||||
|
||||
#zerorpc doesnt consume messages with >13.0.2, need to debug
|
||||
pyzmq==13.0.2
|
||||
# NOTE(jnowak): there is a bug in zerorpc, if pyzmq>13.0.2
|
||||
# working workaround included
|
||||
pyzmq>=13.0.2
|
||||
zerorpc>=0.5.2
|
||||
|
||||
|
||||
|
@ -15,10 +15,21 @@
|
||||
import sys
|
||||
|
||||
import gevent
|
||||
import zerorpc
|
||||
|
||||
from solar.core.log import log
|
||||
from solar.orchestration.executors import base
|
||||
# NOTE(jnowak): this is a workaround for bug in zerorpc.gevent_zmq
|
||||
# it's broken on gevent patched environments and when
|
||||
# pyzmq > 13.0.2
|
||||
import zmq.green as zmq
|
||||
if tuple(map(int, zmq.__version__.split('.'))) > (13, 0, 2):
|
||||
sys.modules['zmq'] = zmq
|
||||
else:
|
||||
del zmq
|
||||
|
||||
# NOTE(jnowak): NOQA because of workaround above (E402)
|
||||
import zerorpc # NOQA
|
||||
|
||||
from solar.core.log import log # NOQA
|
||||
from solar.orchestration.executors import base # NOQA
|
||||
|
||||
|
||||
class PoolBasedPuller(zerorpc.Puller):
|
||||
|
Loading…
x
Reference in New Issue
Block a user