Update main.py

This commit is contained in:
Edwin Jose 2025-09-04 13:37:06 -04:00
parent 2d0f53be30
commit 9f62d066ef

View file

@ -196,12 +196,7 @@ async def ingest_default_documents_when_ready(services):
try:
# Ensure OpenSearch is ready and indices exist
await init_index()
# Only run in no-auth mode (mirrors non-auth upload behavior)
if not is_no_auth_mode():
print("[INGEST] Skipping default documents ingestion: auth mode enabled")
return
base_dir = os.path.abspath(os.path.join(os.getcwd(), "documents"))
if not os.path.isdir(base_dir):
print(f"[INGEST] Documents directory not found at {base_dir}; skipping")