refactor(api): TOML 配置 SSOT、统一错误契约、Auth/事务加固与可观测性 (#33)
配置 SSOT(TOML + .env) 统一错误契约 Auth 与事务边界 Redis / Celery 可靠性:业务 Redis(DB/0)与 Celery broker/backend(DB/1)显式拆分;连接池、sync client 可观测性(OpenTelemetry + LGTM)
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
from fastapi import Depends
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from app.core.db import get_async_db
|
||||
from app.features.story.service import StoryService
|
||||
from app.core.deps_types import DbDep
|
||||
|
||||
|
||||
async def get_story_service(db: AsyncSession = Depends(get_async_db)) -> StoryService:
|
||||
async def get_story_service(db: DbDep) -> StoryService:
|
||||
return StoryService(db=db)
|
||||
|
||||
Reference in New Issue
Block a user