Run self.eval_master in self.io_loop.run_sync

This commit is contained in:
Sergey Kacheev 2016-03-24 13:11:43 +06:00
parent 3b4425652b
commit 3d7874029a

View File

@ -522,9 +522,7 @@ class SMinion(MinionBase):
self.opts.get('use_master_when_local', False)):
# actually eval_master returns the future and we need to wait for it
self.io_loop = zmq.eventloop.ioloop.ZMQIOLoop()
far_future = self.eval_master(self.opts, failed=True)
self.io_loop.add_future(far_future, lambda _: self.io_loop.stop())
self.io_loop.start()
self.io_loop.run_sync(lambda: self.eval_master(self.opts, failed=True))
self.gen_modules(initial_load=True)
def gen_modules(self, initial_load=False):