feat: 添加 API 路由(公告/爬取/微信回调/调度器)+ 健康检查测试
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user