mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix broken eventlisten and small refactor.
This commit is contained in:
parent
dff03061c4
commit
e93d73d39c
1 changed files with 6 additions and 5 deletions
|
@ -63,14 +63,15 @@ def parse():
|
|||
return opts
|
||||
|
||||
|
||||
def listen(sock_dir, node, id=None):
|
||||
#def listen(sock_dir, node):
|
||||
def listen(opts):
|
||||
'''
|
||||
Attach to the pub socket and grab messages
|
||||
'''
|
||||
event = salt.utils.event.SaltEvent(
|
||||
node,
|
||||
sock_dir,
|
||||
id=id
|
||||
opts['node'],
|
||||
opts['sock_dir'],
|
||||
opts
|
||||
)
|
||||
print(event.puburi)
|
||||
jid_counter = 0
|
||||
|
@ -98,4 +99,4 @@ def listen(sock_dir, node, id=None):
|
|||
|
||||
if __name__ == '__main__':
|
||||
opts = parse()
|
||||
listen(opts['sock_dir'], opts['node'], id=opts.get('id', ''))
|
||||
listen(opts)
|
||||
|
|
Loading…
Add table
Reference in a new issue