Pine
|
691cb83e97
|
fix(server-core): lifespan 关闭时释放数据库引擎连接池 — 修复重启后 lifespan 挂起/库被锁
平台 DB(SQLAlchemy) shutdown 仅 close 会话,未 dispose 引擎,连接残留导致下次启动
initialize() 被锁/挂起(uvicorn 报 lifespan unsupported → app.state.db 未设置 → 全 500)。
改为 shutdown 时 dispose _engine,释放连接池。
|
2026-08-24 19:09:35 +08:00 |
|
Pine
|
b90539a013
|
feat(server): 统一登录+算力打通(port 阶段0-1)落地四层架构
- 登录:/auth/send-code·phone-login·wx-login·wx-phone(复用 RBAC 签发)
- 算力:services/compute_client(loopback :3000)+ /admin/compute/ping·provision
- /v1 relay 改走 compute-engine(前端不直连引擎)
- 模型:User 补 wx_openid/phone;仓储 async create+新方法
- 契约:api/schemas(auth/compute)Pydantic
|
2026-08-24 14:16:34 +08:00 |
|
Pine
|
980a2db6d9
|
refactor: 平台应用异步四层架构(接口/业务/领域/基础设施)
- 基础设施层 async:SQLAlchemy 异步引擎/会话、33 Repository async 化、models/security/seed 迁入 infrastructure、新增 cache.py(redis.asyncio) 与 oss.py(aioboto3)
- 接口层:routers 迁 api/routers 并全 async,dependencies 迁 api/dependencies(get_db/get_current_user async)
- 依赖:sqlalchemy[asyncio]/aiosqlite/asyncmy/redis/aioboto3;config 异步 URL + Redis/OSS 配置
- 删除废弃:旧同步 db/dependencies/repositories/storage
- 验证:平台 19 路由 + 培训 48 路由全注册;/health /auth/login /auth/me /admin/tasks /notifications 等接口 async 可用
|
2026-08-23 23:52:58 +08:00 |
|
Pine
|
26fa546f67
|
feat: 核心服务端基础框架(身份/平台 API)
- 七端口 RBAC、select-identity、JWT、审计
- FastAPI + SQLAlchemy + SQLite,/auth /opc /admin /agents 等路由
|
2026-08-23 22:35:59 +08:00 |
|