fix(hub): remove trade UI stubs, public ping, multipart dep

This commit is contained in:
dekun
2026-05-22 12:07:26 +08:00
parent 7d263c349f
commit d075471573
3 changed files with 29 additions and 1 deletions
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
# 在服务器上检查中控是否为最新代码(无 api_trade_key、已装 multipart
set -euo pipefail
HUB_DIR="$(cd "$(dirname "$0")/.." && pwd)"
cd "$HUB_DIR"
echo "=== hub.py 检查 ==="
if grep -n 'def api_trade_key' hub.py 2>/dev/null; then
echo "FAIL: 仍是旧版 hub.py(含 api_trade_key),请 git pull 或同步最新代码"
exit 1
fi
if ! grep -q 'HUB_BUILD' hub.py; then
echo "FAIL: hub.py 缺少 HUB_BUILD 标记,代码过旧"
exit 1
fi
echo "OK: 无 api_trade_key,含 HUB_BUILD"
echo "=== python-multipart ==="
# shellcheck source=/dev/null
source .venv/bin/activate
python -c "import multipart; print('OK:', multipart.__version__)"
echo "=== /api/ping ==="
curl -sf http://127.0.0.1:5100/api/ping | python -m json.tool
echo ""
echo "若 build 不是 20260521-no-trade-ui,请 pm2 restart manual-trading-hub"