feat: 添加 API 路由(公告/爬取/微信回调/调度器)+ 健康检查测试

This commit is contained in:
2026-05-09 14:19:11 +08:00
parent 3616e5799d
commit a0a06dfd8c
12 changed files with 341 additions and 0 deletions
+6
View File
@@ -20,7 +20,10 @@ async def lifespan(app: FastAPI):
level=getattr(logging, settings.log_level),
format="%(asctime)s [%(levelname)s] %(name)s: %(message)s",
)
from app.scheduler.jobs import start_scheduler, shutdown_scheduler
start_scheduler()
yield
shutdown_scheduler()
await engine.dispose()
@@ -32,6 +35,9 @@ app = FastAPI(
redoc_url=None,
)
from app.api.router import api_router
app.include_router(api_router)
@app.get("/health")
async def health():