Skip to content
This repository was archived by the owner on Jan 4, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions gce/cron_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,15 @@ def process_messages(self, msgs):

def watch_topic(self):
while True:
msgs = self.get_messages()
if msgs:
msgs = None
try:
msgs = self.get_messages()
except Error:
log.error('Failed to get messages.')

if (msgs != None):
self.process_messages(msgs)
else:
log.error('Skipping processing message.')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not having any messages should not raise errors?

# when return immediately is False- there is about a 90second open
# request