mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Use ZMQ installer for master
This commit is contained in:
parent
453e83210a
commit
cbb26dcb28
@ -28,6 +28,7 @@ except ImportError:
|
|||||||
# pylint: disable=import-error,no-name-in-module,redefined-builtin
|
# pylint: disable=import-error,no-name-in-module,redefined-builtin
|
||||||
import salt.ext.six as six
|
import salt.ext.six as six
|
||||||
from salt.ext.six.moves import range
|
from salt.ext.six.moves import range
|
||||||
|
from salt.utils.zeromq import zmq, ZMQDefaultLoop, install_zmq, zmq_version_info
|
||||||
# pylint: enable=import-error,no-name-in-module,redefined-builtin
|
# pylint: enable=import-error,no-name-in-module,redefined-builtin
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@ -858,9 +859,8 @@ class MWorker(SignalHandlingMultiprocessingProcess):
|
|||||||
Bind to the local port
|
Bind to the local port
|
||||||
'''
|
'''
|
||||||
# using ZMQIOLoop since we *might* need zmq in there
|
# using ZMQIOLoop since we *might* need zmq in there
|
||||||
if HAS_ZMQ and not TORNADO_50:
|
install_zmq()
|
||||||
zmq.eventloop.ioloop.install()
|
self.io_loop = ZMQDefaultLoop()
|
||||||
self.io_loop = LOOP_CLASS()
|
|
||||||
self.io_loop.make_current()
|
self.io_loop.make_current()
|
||||||
for req_channel in self.req_channels:
|
for req_channel in self.req_channels:
|
||||||
req_channel.post_fork(self._handle_payload, io_loop=self.io_loop) # TODO: cleaner? Maybe lazily?
|
req_channel.post_fork(self._handle_payload, io_loop=self.io_loop) # TODO: cleaner? Maybe lazily?
|
||||||
|
Loading…
Reference in New Issue
Block a user