Added fields to sub event data to enable normalized processing of events

This commit is contained in:
Samuel M Smith 2013-08-23 16:14:47 -06:00
parent 6061aeddf3
commit b9e7567b6f

View File

@ -307,19 +307,30 @@ class SaltEvent(object):
self.fire_event(
data,
'{0}.{1}'.format(tags[0], tags[-1])) # old dup event
data['jid'] = load['jid']
data['id'] = load['id']
data['success'] = false
data['return'] = 'Error: {0}.{1}'.format(tags[0], tags[-1])
data['fun'] = load['fun']
self.fire_event(
data,
tagify([load['jid'],
'ret',
'sub',
load['id'],
'error',
tags[0],
tags[-1]],
'job'))
'error',
load['fun']],
'job'))
except Exception:
pass
else:
self.fire_event(load, load['fun'])
self.fire_event(load, load['fun']) # old dup event
self.fire_event(load,
tagify([load['jid'],
'sub',
load['id'],
'ret',
load['fun']],
'job'))
def __del__(self):
self.destroy()