debug: start index
All checks were successful
Deploy on push / deploy (push) Successful in 55s

This commit is contained in:
Stepan Vladovskiy 2025-03-21 13:30:23 -03:00
parent ad0ca75aa9
commit 90699768ff

View File

@ -44,6 +44,11 @@ async def check_search_service():
print(f"[INFO] Search service is available: {info}") print(f"[INFO] Search service is available: {info}")
# indexing DB data
# async def indexing():
# from services.db import fetch_all_shouts
# all_shouts = await fetch_all_shouts()
# await initialize_search_index(all_shouts)
async def lifespan(_app): async def lifespan(_app):
try: try:
create_all_tables() create_all_tables()
@ -59,7 +64,7 @@ async def lifespan(_app):
# After basic initialization is complete, fetch shouts and initialize search # After basic initialization is complete, fetch shouts and initialize search
from services.db import fetch_all_shouts # Import your database access function from services.db import fetch_all_shouts # Import your database access function
all_shouts = await fetch_all_shouts() # Replace with your actual function all_shouts = await fetch_all_shouts()
await initialize_search_index(all_shouts) await initialize_search_index(all_shouts)
yield yield