feat: Phase 1 잔여 기능 구현 완료
- 품질시험 API: schemas/quality.py + api/quality.py (CRUD, 합격률 요약, 자동 합불 판정) - PDF 생성: WeasyPrint + Jinja2 (작업일보/검측요청서/보고서 템플릿 + /pdf 다운로드 엔드포인트) - RAG 시드 스크립트: scripts/seed_rag.py (PDF/TXT 청킹, 배치 임베딩, CLI) - APScheduler: 날씨 3시간 주기 자동 수집 + 경보 평가 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+7
-3
@@ -2,14 +2,17 @@ from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
from contextlib import asynccontextmanager
|
||||
from app.config import settings
|
||||
from app.api import auth, projects, tasks, daily_reports, reports, inspections, weather, rag, kakao, permits, settings as settings_router
|
||||
from app.api import auth, projects, tasks, daily_reports, reports, inspections, weather, rag, kakao, permits, quality, settings as settings_router
|
||||
from app.services.scheduler import start_scheduler, stop_scheduler
|
||||
|
||||
|
||||
@asynccontextmanager
|
||||
async def lifespan(app: FastAPI):
|
||||
# Startup: seed default work types, check DB connection
|
||||
# Startup
|
||||
start_scheduler()
|
||||
yield
|
||||
# Shutdown: cleanup resources
|
||||
# Shutdown
|
||||
stop_scheduler()
|
||||
|
||||
|
||||
def create_app() -> FastAPI:
|
||||
@@ -41,6 +44,7 @@ def create_app() -> FastAPI:
|
||||
app.include_router(rag.router, prefix=api_prefix)
|
||||
app.include_router(kakao.router, prefix=api_prefix)
|
||||
app.include_router(permits.router, prefix=api_prefix)
|
||||
app.include_router(quality.router, prefix=api_prefix)
|
||||
app.include_router(settings_router.router, prefix=api_prefix)
|
||||
|
||||
@app.get("/health")
|
||||
|
||||
Reference in New Issue
Block a user