diff --git a/gateway/app.py b/gateway/app.py index fe65caf..bc19f79 100644 --- a/gateway/app.py +++ b/gateway/app.py @@ -271,11 +271,12 @@ async def face_features( img_bytes = None if image_file: raw = await image_file.read() - if len(raw) > 1_000_000: - return JSONResponse(status_code=200, content={ - "code": 1006, "message": "文件超出 1 MB 限制", - "request_id": f"gw-{_uuid.uuid4().hex[:8]}", "data": None, - }) + # TODO: 临时取消限制,后续恢复 + # if len(raw) > 1_000_000: + # return JSONResponse(status_code=200, content={ + # "code": 1006, "message": "文件超出 1 MB 限制", + # "request_id": f"gw-{_uuid.uuid4().hex[:8]}", "data": None, + # }) img_bytes = raw elif image_base64: b64 = image_base64 diff --git a/restart.sh b/restart.sh new file mode 100755 index 0000000..92a9431 --- /dev/null +++ b/restart.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# 重启网关 + worker 服务 +set -e + +cd "$(dirname "$0")" + +echo "=== 重启网关 ===" +sudo systemctl restart hair-gateway +sudo systemctl status hair-gateway --no-pager -l | head -8 + +echo "" +echo "=== 网关池状态 ===" +sleep 3 +curl -s http://127.0.0.1:8080/gateway-health 2>/dev/null || echo "⚠ 网关未就绪" + +echo "" +echo "=== 重启 worker(GPU 机)===" +echo "如需重启 GPU worker,请登录 GPU 机器执行:" +echo " sudo systemctl restart hair" diff --git a/static/test_interface4.html b/static/test_interface4.html index 2968fa0..ef117a7 100644 --- a/static/test_interface4.html +++ b/static/test_interface4.html @@ -61,7 +61,7 @@
POST /api/v1/face/features | 上传照片 → 火山方舟豆包视觉模型 → 42项面部特征 | data.features 为 JSON 字符串
+POST /api/v1/face/features | 上传照片 → AI视觉模型 → 42项面部特征 | data.features 为 JSON 字符串