Merge pull request #31628 from skizunov/develop3

Use LOOP_CLASS current() to share same IOLoop
This commit is contained in:
Mike Place 2016-03-03 11:14:36 -07:00
commit 1ab330a605

View File

@ -532,7 +532,7 @@ class SMinion(MinionBase):
or self.opts.get('use_master_when_local', False)):
if HAS_ZMQ:
zmq.eventloop.ioloop.install()
io_loop = LOOP_CLASS()
io_loop = LOOP_CLASS.current()
io_loop.run_sync(
lambda: self.eval_master(self.opts, failed=True)
)
@ -653,7 +653,7 @@ class MultiMinion(MinionBase):
if HAS_ZMQ:
zmq.eventloop.ioloop.install()
self.io_loop = LOOP_CLASS()
self.io_loop = LOOP_CLASS.current()
def _spawn_minions(self):
'''
@ -755,7 +755,7 @@ class Minion(MinionBase):
if io_loop is None:
if HAS_ZMQ:
zmq.eventloop.ioloop.install()
self.io_loop = LOOP_CLASS()
self.io_loop = LOOP_CLASS.current()
else:
self.io_loop = io_loop