chore: init monorepo snapshot
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import asyncio
|
||||
from fastapi import FastAPI
|
||||
|
||||
from app.api.routes import router as api_router
|
||||
from app.core.config import get_settings
|
||||
from app.core.logging import setup_logging
|
||||
from app.services.runtime import scheduler, worker
|
||||
|
||||
settings = get_settings()
|
||||
|
||||
setup_logging()
|
||||
|
||||
app = FastAPI(title=settings.app_name)
|
||||
app.include_router(api_router, prefix=settings.api_prefix)
|
||||
|
||||
|
||||
@app.on_event("startup")
|
||||
async def _startup() -> None:
|
||||
scheduler.start()
|
||||
await worker.start()
|
||||
|
||||
|
||||
@app.on_event("shutdown")
|
||||
async def _shutdown() -> None:
|
||||
scheduler.shutdown()
|
||||
await worker.stop()
|
||||
Reference in New Issue
Block a user