feat(etl): stable pipeline, exception registry in SQLite, multi-pass aggregation and db_cli

This commit is contained in:
2026-08-27 19:26:28 +03:00
parent 66087d5806
commit a9680db0aa
77 changed files with 12548 additions and 5625 deletions
+8 -1
View File
@@ -16,6 +16,12 @@ CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
if CURRENT_DIR not in sys.path:
sys.path.insert(0, CURRENT_DIR)
ROOT_DIR = os.path.abspath(os.path.join(CURRENT_DIR, "../../"))
for p in [ROOT_DIR, CURRENT_DIR]:
if p not in sys.path:
sys.path.insert(0, p)
from fastapi import FastAPI, HTTPException
from fastapi.staticfiles import StaticFiles
from fastapi.responses import FileResponse, JSONResponse
@@ -25,6 +31,7 @@ from routers.auth import router as auth_router
from routers.admin import router as admin_router
from routers.tasks import router as tasks_router
from routers.chat import router as chat_router
from routers.files import router as files_router
# ANCHOR[APP_CONFIG]
logging.basicConfig(
@@ -53,6 +60,7 @@ app.include_router(auth_router)
app.include_router(admin_router)
app.include_router(tasks_router)
app.include_router(chat_router)
app.include_router(files_router)
# ANCHOR[ROOT_STATIC_ROUTES]
@app.get("/")
@@ -81,7 +89,6 @@ def serve_static_fallback(file_path: str):
return FileResponse(target, media_type="text/css")
return FileResponse(target)
# Резервный рекурсивный поиск файла в static
filename = os.path.basename(clean_path)
for root, _, files in os.walk(STATIC_DIR):
if filename in files: