def run(self): try: while True: if os.path.exists('/tmp/stop.txt'): sys.exit() messages = aws.get_messages_from_queue(self.manifest_queue) for message in messages: if message is not None: try: self.process_message(message) except: logging.exception("Error processing message") aws.send_message(self.error_queue, message.body) finally: message.delete() except Exception as e: logging.exception("Error getting messages")
def get_messages_from_queue(): messages = aws.get_messages_from_queue(input_queue) return messages
def get_messages_from_queue(): messages = aws.get_messages_from_queue(notification_queue) return messages
def get_messages_from_queue(self): logging.debug("checking queue for messages") messages = aws.get_messages_from_queue(self.ingest_queue) return messages