Skip to content

Commit

Permalink
try to reconnect when connection fails.
Browse files Browse the repository at this point in the history
  • Loading branch information
petersilva committed Oct 19, 2023
1 parent f761fe9 commit 2a94d05
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions sarracenia/flowcb/gather/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@ def gather(self) -> list:
"""
return a current list of messages.
"""
if not hasattr(self,'consumer'):
return []

if hasattr(self.consumer,'newMessages'):
if hasattr(self,'consumer') and hasattr(self.consumer,'newMessages'):
return self.consumer.newMessages()
else:
logger.warning( f'not connected. Trying to connect to {self.o.broker}')
Expand Down

0 comments on commit 2a94d05

Please sign in to comment.