Merge pull request #6743 from SmithSamuelM/develop

Added 'success' field to successful runner return events
This commit is contained in:
Pedro Algarvio 2013-08-16 12:30:30 -07:00
commit f696c5a7c6

View File

@ -36,18 +36,19 @@ class RunnerClient(object):
'''
salt.utils.daemonize()
event = salt.utils.event.MasterEvent(self.opts['sock_dir'])
data = {'fun': fun,
data = {'fun': "runner.{0}".format(fun),
'jid': low['jid'],
}
event.fire_event(data, tagify('new', base=tag))
try:
data['ret'] = self.low(fun, low)
data['success'] = True
except Exception as exc:
data['ret'] = 'Exception occured in runner {0}: {1}'.format(
fun,
exc,
)
fun,
exc,
)
event.fire_event(data, tagify('ret', base=tag))