mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
Merge pull request #30815 from vutny/reactor-low-data-fix
Pick right user argument for updating reactor function's low data
This commit is contained in:
commit
3cb7a9ee54
@ -181,7 +181,7 @@ class ReactWrap(object):
|
||||
def run(self, low):
|
||||
'''
|
||||
Execute the specified function in the specified state by passing the
|
||||
LowData
|
||||
low data
|
||||
'''
|
||||
l_fun = getattr(self, low['state'])
|
||||
try:
|
||||
@ -190,9 +190,9 @@ class ReactWrap(object):
|
||||
|
||||
# TODO: Setting the user doesn't seem to work for actual remote publishes
|
||||
if low['state'] in ('runner', 'wheel'):
|
||||
# TODO: pick one...
|
||||
# Update called function's low data with event user to
|
||||
# segregate events fired by reactor and avoid reaction loops
|
||||
kwargs['__user__'] = self.event_user
|
||||
kwargs['user'] = self.event_user
|
||||
|
||||
l_fun(*f_call.get('args', ()), **kwargs)
|
||||
except Exception:
|
||||
|
Loading…
Reference in New Issue
Block a user