update
This commit is contained in:
@@ -9,6 +9,8 @@ from logsetup import setup_logging
|
||||
setup_logging()
|
||||
|
||||
from config import FRONTEND_DIST, STORAGE_DIR
|
||||
import agents
|
||||
import database
|
||||
from database import init_db, close_db
|
||||
from guide import reconcile_guides
|
||||
from routes import router
|
||||
@@ -18,6 +20,7 @@ from routes import router
|
||||
async def lifespan(app: FastAPI):
|
||||
(STORAGE_DIR / "topics").mkdir(parents=True, exist_ok=True)
|
||||
await init_db()
|
||||
agents.on_event = database.add_event # pipeline history sink (agents.py stays DB-free)
|
||||
await reconcile_guides()
|
||||
yield
|
||||
await close_db()
|
||||
|
||||
Reference in New Issue
Block a user