diff --git a/ai_ta_backend/beam/ingest.py b/ai_ta_backend/beam/ingest.py index 90e38896..374685f8 100644 --- a/ai_ta_backend/beam/ingest.py +++ b/ai_ta_backend/beam/ingest.py @@ -1164,18 +1164,16 @@ def split_and_upload(self, texts: List[str], metadatas: List[Dict[str, Any]], ** collection_name=os.environ['QDRANT_COLLECTION_NAME'], # type: ignore points=vectors, # type: ignore ) - except Timeout as e: - # it's fine if this gets timeout error. it will still post, according to devs: https://github.com/qdrant/qdrant/issues/3654 - print( - "Warning: all update and/or upsert timeouts are fine (completed in background), but errors might not be: ", - e) - pass except Exception as e: - # log other exceptions logging.error("Error in QDRANT upload: ", exc_info=True) err = f"Error in QDRANT upload: {e}" - sentry_sdk.capture_exception(e) - raise Exception(err) + if "timed out" in str(e): + # timed out error is fine, task will continue in background + pass + else: + print(err) + sentry_sdk.capture_exception(e) + raise Exception(err) ### Supabase SQL ### contexts_for_supa = [{