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
|
# plugins
|
||||||
stevedore>=1.5.0
|
stevedore>=1.5.0
|
||||||
|
|
||||||
#zerorpc doesnt consume messages with >13.0.2, need to debug
|
# NOTE(jnowak): there is a bug in zerorpc, if pyzmq>13.0.2
|
||||||
pyzmq==13.0.2
|
# working workaround included
|
||||||
|
pyzmq>=13.0.2
|
||||||
zerorpc>=0.5.2
|
zerorpc>=0.5.2
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,10 +15,21 @@
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
import gevent
|
import gevent
|
||||||
import zerorpc
|
|
||||||
|
|
||||||
from solar.core.log import log
|
# NOTE(jnowak): this is a workaround for bug in zerorpc.gevent_zmq
|
||||||
from solar.orchestration.executors import base
|
# 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):
|
class PoolBasedPuller(zerorpc.Puller):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user