refactor: 移除 gate_bot,统一为三所架构并更新文档
删除 crypto_monitor_gate_bot 目录,中控与子代理改为 binance/okx/gate 三账户; 文档与 UI 文案「四所」改为「三所」;新增清库前一次性配置备份脚本。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -353,7 +353,7 @@ async def _run_archive_sync_once() -> dict:
|
||||
if st == 404:
|
||||
msg = (
|
||||
"HTTP 404:该 Flask 未注册 /api/hub/trades/archive。"
|
||||
"请在仓库根目录 git pull 后 pm2 restart crypto_gate crypto_gate_bot"
|
||||
"请在仓库根目录 git pull 后 pm2 restart crypto_gate"
|
||||
)
|
||||
results.append(
|
||||
{
|
||||
@@ -619,7 +619,7 @@ _ACCOUNT_RISK_BADGE_JS = _REPO_STATIC / "account_risk_badge.js"
|
||||
|
||||
@app.get("/assets/account_risk_badge.css")
|
||||
def hub_account_risk_badge_css():
|
||||
"""与四所实例共用仓库根 static/account_risk_badge.css。"""
|
||||
"""与三所实例共用仓库根 static/account_risk_badge.css。"""
|
||||
if not _ACCOUNT_RISK_BADGE_CSS.is_file():
|
||||
raise HTTPException(status_code=404, detail="account_risk_badge.css not found")
|
||||
return FileResponse(
|
||||
@@ -630,7 +630,7 @@ def hub_account_risk_badge_css():
|
||||
|
||||
@app.get("/assets/account_risk_badge.js")
|
||||
def hub_account_risk_badge_js():
|
||||
"""与四所实例共用仓库根 static/account_risk_badge.js。"""
|
||||
"""与三所实例共用仓库根 static/account_risk_badge.js。"""
|
||||
if not _ACCOUNT_RISK_BADGE_JS.is_file():
|
||||
raise HTTPException(status_code=404, detail="account_risk_badge.js not found")
|
||||
return FileResponse(
|
||||
@@ -641,7 +641,7 @@ def hub_account_risk_badge_js():
|
||||
|
||||
@app.get("/assets/ai_review_render.js")
|
||||
def hub_ai_review_render_js():
|
||||
"""与四所实例共用仓库根 static/ai_review_render.js(须在 /assets mount 之前注册)。"""
|
||||
"""与三所实例共用仓库根 static/ai_review_render.js(须在 /assets mount 之前注册)。"""
|
||||
if not _AI_REVIEW_RENDER_JS.is_file():
|
||||
raise HTTPException(status_code=404, detail="ai_review_render.js not found")
|
||||
return FileResponse(
|
||||
@@ -1542,7 +1542,7 @@ def _flask_error_from_hub_mon(hub_mon: dict | None) -> str | None:
|
||||
if st == 404:
|
||||
return (
|
||||
"HTTP 404:该 Flask 未注册 /api/hub/*(hub_bridge 未加载)。"
|
||||
"请在仓库根目录 git pull 后 pm2 restart crypto_binance crypto_gate crypto_gate_bot,"
|
||||
"请在仓库根目录 git pull 后 pm2 restart crypto_binance crypto_gate,"
|
||||
"并查看启动日志是否含 [hub_bridge] ImportError"
|
||||
)
|
||||
return (
|
||||
@@ -2348,7 +2348,7 @@ async def api_close_position(exchange_id: str, body: ClosePositionBody):
|
||||
if out.get("ok"):
|
||||
ex_key = (ex.get("key") or "").strip().lower()
|
||||
async with httpx.AsyncClient() as flask_client:
|
||||
if ex_key in ("gate", "gate_bot"):
|
||||
if ex_key == "gate":
|
||||
order_sync = await _fetch_flask_json(
|
||||
flask_client,
|
||||
ex,
|
||||
|
||||
Reference in New Issue
Block a user