Merge pull request #49850 from rallytime/bp-49798

Back-port #49798 to 2018.3
This commit is contained in:
Nicole Thomas 2018-10-02 13:40:28 -04:00 committed by GitHub
commit 675df255ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1092,13 +1092,15 @@ class SaltAPIHandler(BaseSaltAPIHandler): # pylint: disable=W0223
'''
Disbatch runner client commands
'''
full_return = chunk.pop('full_return', False)
pub_data = self.saltclients['runner'](chunk)
tag = pub_data['tag'] + '/ret'
try:
event = yield self.application.event_listener.get_event(self, tag=tag)
# only return the return data
raise tornado.gen.Return(event['data']['return'])
ret = event if full_return else event['data']['return']
raise tornado.gen.Return(ret)
except TimeoutException:
raise tornado.gen.Return('Timeout waiting for runner to execute')