[Fix] Catch exceptions from _get_messages
@@ -129,11 +129,18 @@ class SearchIndexerDaemon(threading.Thread):
manager = FutureManager()
+ with client.capture_exceptions():
with ThreadPoolExecutor(max_workers=num_nodes) as pool:
while self.keep_running.is_set():
manager.report()
+
+ try:
messages = self._get_messages()
+ except Exception as e:
+ logger.exception('Unable to fetch messages from RabbitMQ')
+ continue
+
if not messages:
continue
