 UbuntuandClaude
|
bb9f55e93c
|
feat(gateway): 全局串行化(并发=1) + 记录入参/出参/耗时日志
并发模型从「每worker并发1 + 多worker并行」改为全局串行:同一时间
只处理1个请求,其余排队;多 worker 仅作热备(主 worker 坏了才用备机)。
接口4(face/features) 走豆包、不占 GPU,不纳入串行。
- pool: asyncio.Semaphore(max_global_concurrency=1) + acquire/release_global_slot
(依赖单进程 uvicorn 部署,已在注释中标注)
- forward: proxy_request 最外层 acquire 全局槽、try/finally 全路径释放;
入参 multipart 解析挂 request.state;原重试/故障转移逻辑抽到 _dispatch_with_retries
- reqlog(新): 标量入参保留;图片(file/base64)存盘转URL,绝不内嵌base64;
出参递归摘要截断(landmarks/长串/大数组)
- logging_middleware: RequestLogEntry 加 request_params/response_data,
jsonl 全量记录;_load_from_logfile 同步映射防重启丢字段;get_stats recent 暴露
- /gateway-health 暴露 global_max/global_busy/global_waiting
- config: dispatch 新增 max_global_concurrency / max_queue_wait_seconds
- tests: test_reqlog + test_gateway_serialization(9 用例)
顺带提交此前未提交的网关统计(daily stats 接口)与耗时看板(api_timing_dashboard.html)。
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-07-23 22:56:48 +08:00 |
|
Ubuntu
|
5d9d91bc82
|
save code
|
2026-07-12 18:50:05 +08:00 |
|
Ubuntu
|
de2cecf0d5
|
save code
|
2026-07-10 00:38:39 +08:00 |
|
Ubuntu
|
aa981229c0
|
添加统计请求的功能
|
2026-07-02 23:28:49 +08:00 |
|
Ubuntu
|
5d94edfc1a
|
save code
|
2026-06-25 20:25:49 +08:00 |
|
Ubuntu
|
5fd7d05d26
|
save code
|
2026-06-24 20:49:34 +08:00 |
|
Ubuntu
|
e58ece0ada
|
save code
|
2026-06-23 23:30:24 +08:00 |
|
 UbuntuandClaude
|
76bae98073
|
feat(接口2/7): hair_style改为多选复选框,新增接口7测试页,网关注册v2路由
- 接口2/7测试页:发型从单选下拉框改为多选复选框+全选/全不选,提交时逗号分隔
- 新建static/test_interface7.html(基于接口2测试页,紫色主题,调用/api/v1/hair/grow-v2)
- gateway/app.py:注册/api/v1/hair/grow-v2代理路由 + 首页索引
- integration.html:新增接口7完整文档卡片(入参/出参/测试页链接)
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-06-22 23:43:39 +08:00 |
|
Ubuntu
|
24da4eae6f
|
save code
|
2026-06-17 23:27:34 +08:00 |
|
Ubuntu
|
c15a3c2e15
|
save code
|
2026-06-17 23:04:49 +08:00 |
|
Ubuntu
|
d2642b66f8
|
save code
|
2026-06-16 21:15:19 +08:00 |
|
Ubuntu
|
a3f4c822cb
|
feat: 补接口4测试页,更新索引和接入说明
- static/test_interface4.html: 上传照片 → 英文优先字段 + 全部42项特征表格 + 原始JSON
- gateway/app.py: 首页索引增加 if4_features 测试页
- static/integration.html: 接入说明补充接口4测试页链接
|
2026-06-15 21:36:40 +08:00 |
|
Ubuntu
|
bee4bdae10
|
feat: 前端接入说明页 + 网关首页索引
- static/integration.html: 5接口入参/出参表、fetch示例、错误码、在线测试页链接
- gateway/app.py: 首页 / 增加 test_pages 和 integration_guide 索引
|
2026-06-15 21:26:56 +08:00 |
|
Ubuntu
|
68fe1c1406
|
feat(网关): 接口4 改由网关本机直接调豆包视觉模型,不再代理到 worker
- gateway/app.py: 接口4 handler 改为直接调用 face_features 模块
- face_features.py: API Key 读取支持 gateway/config.json
- gateway/config.example.json: 增加 ark_api_key 配置项
|
2026-06-15 20:46:12 +08:00 |
|
Ubuntu
|
795de68985
|
save code
|
2026-06-15 10:33:15 +08:00 |
|
Ubuntu
|
cd4ca278d4
|
完成接口1 和接口2,测试页面也完成
|
2026-06-15 10:10:52 +08:00 |
|
Ubuntu
|
eaafbc97ea
|
save code
|
2026-06-14 18:23:08 +08:00 |
|
Ubuntu
|
3b706ec0ef
|
网关开发完成
|
2026-06-14 15:04:34 +08:00 |
|
Ubuntu
|
2c669fa7e5
|
save code
|
2026-06-13 23:04:37 +08:00 |
|
Ubuntu
|
d8a6e53979
|
save code
|
2026-06-13 12:11:31 +08:00 |
|
 UbuntuandCursor
|
5313206976
|
初始化 FastAPI HTTPS Hello World 服务
包含 FastAPI 应用、Nginx 反向代理配置、systemd 服务及腾讯云 pip 源配置。
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-06-04 21:59:53 +08:00 |
|