mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Added fields to sub event data to enable normalized processing of events
This commit is contained in:
parent
6061aeddf3
commit
b9e7567b6f
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user