From 11846eda79058e732174f2ab2dea1943e30999fe Mon Sep 17 00:00:00 2001 From: chr Date: Thu, 2 Apr 2020 23:22:34 -0700 Subject: [PATCH] make appservice more resilient --- service.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/service.py b/service.py index 2d46a9a..0754ff7 100644 --- a/service.py +++ b/service.py @@ -223,8 +223,12 @@ class Appservice: def receive_messages( appservice: Appservice, msg_queue: message_queue.MessageQueue ): - for message in msg_queue: - appservice.process_message(message) + while True: + try: + for message in msg_queue: + appservice.process_message(message) + except Exception as e: + LOG.exception(e) def main():