"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "salt/engines/slack.py" between
salt-2019.2.0.tar.gz and salt-2019.2.1.tar.gz

About: SaltStack is a systems management software for data center automation, cloud orchestration, server provisioning, configuration management and more. Community version.

slack.py  (salt-2019.2.0):slack.py  (salt-2019.2.1)
skipping to change at line 725 skipping to change at line 725
# Drain the slack messages, up to 10 messages at a clip # Drain the slack messages, up to 10 messages at a clip
count = 0 count = 0
for msg in message_generator: for msg in message_generator:
# The message_generator yields dicts. Leave this loop # The message_generator yields dicts. Leave this loop
# on a dict that looks like {'done': True} or when we've done it # on a dict that looks like {'done': True} or when we've done it
# 10 times without taking a break. # 10 times without taking a break.
log.trace('Got a message from the generator: %s', msg.keys()) log.trace('Got a message from the generator: %s', msg.keys())
if count > 10: if count > 10:
log.warning('Breaking in getting messages because count is e xceeded') log.warning('Breaking in getting messages because count is e xceeded')
break break
if len(msg) == 0: if not msg:
count += 1 count += 1
log.warning('Skipping an empty message.') log.warning('Skipping an empty message.')
continue # This one is a dud, get the next message continue # This one is a dud, get the next message
if msg.get('done'): if msg.get('done'):
log.trace('msg is done') log.trace('msg is done')
break break
if fire_all: if fire_all:
log.debug('Firing message to the bus with tag: %s', tag) log.debug('Firing message to the bus with tag: %s', tag)
log.debug('%s %s', tag, msg) log.debug('%s %s', tag, msg)
self.fire('{0}/{1}'.format(tag, msg['message_data'].get('typ e')), msg) self.fire('{0}/{1}'.format(tag, msg['message_data'].get('typ e')), msg)
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)