Make porting from persistent volumes optional (#1268)

This commit is contained in:
Yuhong Sun
2024-03-28 11:26:11 -07:00
committed by GitHub
parent fd69203be8
commit d46b475410

View File

@@ -169,7 +169,12 @@ async def lifespan(app: FastAPI) -> AsyncGenerator:
f"Using multilingual flow with languages: {MULTILINGUAL_QUERY_EXPANSION}"
)
port_filesystem_to_postgres()
try:
port_filesystem_to_postgres()
except Exception:
logger.debug(
"Skipping port of persistent volumes. Maybe these have already been removed?"
)
with Session(engine) as db_session:
db_embedding_model = get_current_db_embedding_model(db_session)