Commit Graph

2 Commits

Author SHA1 Message Date
Pine 0fd1307d57 全线加入Redis缓存:1)统一Redis配置支持PINEAGENTS_REDIS_*前缀;2)增强cache.py:JSON序列化/缓存装饰器/批量删除/分布式锁/全局单例+连接池;3)大厅任务列表缓存8秒(key含用户ID+筛选条件);4)大厅总览缓存30秒;5)人才/服务/岗位列表缓存20秒;6)用户档案_actor_profile缓存30秒(can_accept核心依赖);7)认证类型列表缓存5分钟;8)应用启动时连接Redis,失败自动降级无缓存 2026-09-05 14:33:38 +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