mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Merge pull request #31628 from skizunov/develop3
Use LOOP_CLASS current() to share same IOLoop
This commit is contained in:
commit
1ab330a605
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user