fix lint error

This commit is contained in:
grillazz
2025-03-08 18:34:41 +01:00
parent 5ede530a4d
commit b594dee278
3 changed files with 6 additions and 11 deletions

View File

@@ -5,8 +5,6 @@ from apscheduler import AsyncScheduler
from apscheduler.datastores.sqlalchemy import SQLAlchemyDataStore
from apscheduler.eventbrokers.redis import RedisEventBroker
from fastapi import Depends, FastAPI
from fastapi_cache import FastAPICache
from fastapi_cache.backends.redis import RedisBackend
from app.api.health import router as health_router
from app.api.nonsense import router as nonsense_router
@@ -15,7 +13,7 @@ from app.api.stuff import router as stuff_router
from app.api.user import router as user_router
from app.config import settings as global_settings
from app.database import engine
from app.redis import get_cache, get_redis
from app.redis import get_redis
from app.services.auth import AuthBearer
from app.services.scheduler import SchedulerMiddleware
from app.utils.logging import AppLogger
@@ -31,10 +29,7 @@ async def lifespan(_app: FastAPI):
_postgres_dsn = global_settings.postgres_url.unicode_string()
try:
# Initialize the cache with the redis connection
redis_cache = await get_cache()
FastAPICache.init(RedisBackend(redis_cache), prefix="fastapi-cache")
# logger.info(FastAPICache.get_cache_status_header())
# TODO: cache with the redis connection
# Initialize the postgres connection pool
_app.postgres_pool = await asyncpg.create_pool(
dsn=_postgres_dsn,