refactor: 统一 Redis 连接管理,改用 RedisService
- App 启动时初始化 RedisService,关闭时释放连接 - Celery worker 通过 worker_process_init 钩子初始化 Redis - Agent 端点改用 RedisService 替代直接创建连接 - Celery task 改为 async def,使用统一连接 - 删除无用的 infra 模块和 core/http/models - 日志脱敏,不记录 Redis 密码 - 初始化失败时 fail-fast - 异常发布添加二级保护
This commit is contained in:
@@ -15,16 +15,6 @@ def test_app_health_returns_envelope() -> None:
|
||||
assert body["status"] == "ok"
|
||||
|
||||
|
||||
def test_mobile_router_health_returns_envelope() -> None:
|
||||
client = TestClient(app)
|
||||
|
||||
response = client.get("/api/v1/health")
|
||||
|
||||
assert response.status_code == 200
|
||||
body = response.json()
|
||||
assert body["status"] == "ok"
|
||||
|
||||
|
||||
def test_not_found_returns_error_envelope() -> None:
|
||||
client = TestClient(app)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user