This commit is contained in:
Manoj Aggarwal 2026-01-09 13:20:54 -08:00
parent 18035b3728
commit 36c395ba72

View file

@ -1251,14 +1251,11 @@ async def run_teams_indexing(
update_last_indexed=False, # Don't update timestamp in the indexing function update_last_indexed=False, # Don't update timestamp in the indexing function
) )
# Update last_indexed_at if indexing was successful (regardless of new/skipped docs) # Update last_indexed_at after successful indexing (even if 0 new docs - they were checked)
if error_or_warning is None:
await update_connector_last_indexed(session, connector_id) await update_connector_last_indexed(session, connector_id)
logger.info( logger.info(
f"Teams indexing completed successfully: {documents_processed} documents processed" f"Teams indexing completed successfully: {documents_processed} documents processed. {error_or_warning or ''}"
) )
else:
logger.error(f"Teams indexing failed: {error_or_warning}")
except Exception as e: except Exception as e:
logger.error(f"Error in background Teams indexing task: {e!s}") logger.error(f"Error in background Teams indexing task: {e!s}")