mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #52619 from dwoz/pytest_engine_2019.2.1
Remove unused method from pytest engine
This commit is contained in:
commit
4859e6c9f0
1 changed files with 1 additions and 18 deletions
|
@ -56,11 +56,7 @@ class PyTestEngine(object):
|
|||
|
||||
@gen.coroutine
|
||||
def _start(self):
|
||||
if self.opts['__role'] == 'minion':
|
||||
yield self.listen_to_minion_connected_event()
|
||||
else:
|
||||
self.io_loop.spawn_callback(self.fire_master_started_event)
|
||||
|
||||
self.io_loop.spawn_callback(self.fire_master_started_event)
|
||||
port = int(self.opts['runtests_conn_check_port'])
|
||||
log.info('Starting Pytest Engine(role=%s) on port %s', self.opts['__role'], port)
|
||||
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
|
@ -92,19 +88,6 @@ class PyTestEngine(object):
|
|||
# This is not macOS !?
|
||||
pass
|
||||
|
||||
@gen.coroutine
|
||||
def listen_to_minion_connected_event(self):
|
||||
log.info('Listening for minion connected event...')
|
||||
minion_start_event_match = 'salt/minion/{0}/start'.format(self.opts['id'])
|
||||
event_bus = salt.utils.event.get_master_event(self.opts, self.opts['sock_dir'], listen=True)
|
||||
event_bus.subscribe(minion_start_event_match)
|
||||
while True:
|
||||
event = event_bus.get_event(full=True, no_block=True)
|
||||
if event is not None and event['tag'] == minion_start_event_match:
|
||||
log.info('Got minion connected event: %s', event)
|
||||
break
|
||||
yield gen.sleep(0.25)
|
||||
|
||||
@gen.coroutine
|
||||
def fire_master_started_event(self):
|
||||
log.info('Firing salt-master started event...')
|
||||
|
|
Loading…
Add table
Reference in a new issue