app/worker/celery_app.py:22:    include=["app.tasks.send_tasks"],
app/worker/celery_app.py:36:    task_routes={"app.tasks.send_tasks.send_one": {"queue": "send"},
app/worker/celery_app.py:37:                 "app.tasks.send_tasks.*": {"queue": "send"}},
---MAIN-IMPORTS---
"""FastAPI application entrypoint: routers, static files, security headers, startup."""
import logging
from contextlib import asynccontextmanager

from fastapi import FastAPI, Request
from fastapi.responses import JSONResponse, FileResponse
from fastapi.staticfiles import StaticFiles
from starlette.middleware.base import BaseHTTPMiddleware

from app.api.routers import (accounts, attachments, auth, campaigns, dashboard,
                             recipients, settings_router, subjects, suppression,
                             templates, phones, test_send, logs, unsubscribe as unsub_router)
from app.core.config import settings

logging.basicConfig(level=logging.INFO,
                    format="%(asctime)s %(levelname)s %(name)s %(message)s")


@asynccontextmanager
async def lifespan(app: FastAPI):
    yield
    from app.db.session import close_engines
    await close_engines()


app = FastAPI(title=settings.APP_NAME, lifespan=lifespan,
              docs_url="/api/docs", openapi_url="/api/openapi.json")


class SecurityHeadersMiddleware(BaseHTTPMiddleware):
