The result of this try-finally block was that exceptions would be lost, since they are raised after the finally block returns. Because the machine is shut down in the finally block, there is no opportunity for the exception to ever bubble up.
@@ -64,7 +64,9 @@ def _execute_indexing_task(target_index, start_id, end_id, notify_url):
def _launch_reindex(table, target_index, query, indexer, notify_url):
try:
indexer.replicate(table, target_index, query)
- finally:
+ except Exception:
+ log.error("Indexing error occurred: ", exc_info=True)
+
log.info(f'Notifying {notify_url}')
requests.post(notify_url)
_self_destruct()
