mirror of
https://github.com/flibusta-apps/telegram_files_cache_server.git
synced 2025-12-06 06:35:38 +01:00
Fix
This commit is contained in:
@@ -14,7 +14,6 @@ from core.taskiq_worker import broker
|
||||
|
||||
@asynccontextmanager
|
||||
async def lifespan(app: FastAPI):
|
||||
database = app.state.database
|
||||
if not database.is_connected:
|
||||
await database.connect()
|
||||
|
||||
@@ -35,7 +34,6 @@ async def lifespan(app: FastAPI):
|
||||
def start_app() -> FastAPI:
|
||||
app = FastAPI(default_response_class=ORJSONResponse, lifespan=lifespan)
|
||||
|
||||
app.state.database = database
|
||||
app.state.redis_pool = ConnectionPool.from_url(REDIS_URL)
|
||||
|
||||
app.include_router(router)
|
||||
|
||||
Reference in New Issue
Block a user