feat: enrichment Hub API, feature flags UI/gating, NCM refresher, Agent enrichment worker with tests

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
gti
2026-09-25 18:47:35 -03:00
co-authored by Claude Sonnet 5
parent 27f992d9e0
commit 5deebea14e
22 changed files with 1118 additions and 23 deletions
+7
View File
@@ -1,6 +1,7 @@
"""FastAPI application factory."""
import logging
import sys
from collections.abc import Callable
from fastapi import FastAPI, HTTPException
@@ -40,6 +41,12 @@ def create_app(database_probe: Callable[[], bool] = database_is_available, sessi
app.include_router(control_api_router(session_factory))
app.include_router(agent_distribution_router(session_factory))
app.include_router(web_router(session_factory))
if settings.official_refresh_enabled and session_factory is SessionLocal and "pytest" not in sys.modules:
@app.on_event("startup")
def _start_official_refresh():
from .datasets.updater import start_scheduler
start_scheduler(session_factory)
app.mount("/static", StaticFiles(directory="central/static"), name="static")
return app