配置 SSOT(TOML + .env) 统一错误契约 Auth 与事务边界 Redis / Celery 可靠性:业务 Redis(DB/0)与 Celery broker/backend(DB/1)显式拆分;连接池、sync client 可观测性(OpenTelemetry + LGTM)
9 lines
208 B
Python
9 lines
208 B
Python
from fastapi import Depends
|
|
|
|
from app.features.story.service import StoryService
|
|
from app.core.deps_types import DbDep
|
|
|
|
|
|
async def get_story_service(db: DbDep) -> StoryService:
|
|
return StoryService(db=db)
|