backend apis updation

This commit is contained in:
sriram
2026-08-13 15:54:29 +05:30
parent b8d93fbbf2
commit 241fd237f8
13 changed files with 973 additions and 105 deletions

View File

@@ -47,8 +47,13 @@ async def lifespan(_app: FastAPI):
try:
ensure_store_intelligence_schema()
ensure_nutrition_schema()
from app.api.routers.system import _run_background_auto_seed
from app.api.routers.system import _run_background_auto_seed, _run_background_brand_sync
_run_background_auto_seed()
# Runs after the auto-seed so a cold boot has already loaded the
# bundled catalogs and this finds nothing to do. On a warm boot the
# auto-seed no-ops and this is what picks up a brand table or seed
# file that appeared since last time.
_run_background_brand_sync()
except Exception as e:
logger.warning("Startup background init warning: %s", e)