from fastapi import FastAPI

from api.routers import health, alerts
from api.analysis import cpu
from api.scheduler import start_scheduler

app = FastAPI(title="Infra Assistant")

app.include_router(health.router)
app.include_router(alerts.router)
app.include_router(cpu.router, prefix="/analysis")

@app.on_event("startup")
async def startup():
    start_scheduler()
