producers, consumers, rabbit_client
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
from contextlib import asynccontextmanager
|
||||
from pathlib import Path
|
||||
|
||||
# import uvicorn
|
||||
from fastapi import FastAPI
|
||||
|
||||
from src.cache.redis_client import redis_client
|
||||
from src.database.users.crud import Seed
|
||||
from src.logging.logger import LoggingMiddleware, ProcessingTimeMiddleware
|
||||
from src.messaging.rabbitmq_client import rabbitmq_client
|
||||
from src.web.protected_routes.auth_routes import router as protected_router
|
||||
from src.web.protected_routes.protected_user_action_routes import (
|
||||
router as protected_user_action_routes,
|
||||
@@ -19,7 +19,7 @@ async def lifespan(app: FastAPI):
|
||||
await create_first_user()
|
||||
yield
|
||||
await redis_client.close()
|
||||
|
||||
await rabbitmq_client.close()
|
||||
|
||||
app=FastAPI(root_path="/", lifespan=lifespan)
|
||||
app.add_middleware(LoggingMiddleware)
|
||||
|
||||
Reference in New Issue
Block a user