diff --git a/crypto_monitor_binance/.env.example b/crypto_monitor_binance/.env.example index 8ded315..46d99b9 100644 --- a/crypto_monitor_binance/.env.example +++ b/crypto_monitor_binance/.env.example @@ -87,7 +87,7 @@ BINANCE_POSITION_MODE=hedge # 条件单触发参考价:CONTRACT_PRICE=最新成交价 MARK_PRICE=标记价(更易触发时用标记价) BINANCE_TRIGGER_WORKING_TYPE=CONTRACT_PRICE # 页面与浏览器标签展示的交易所名称(多环境区分时可改成例如 Binance·测试网) -# EXCHANGE_DISPLAY_NAME=Binance +EXCHANGE_DISPLAY_NAME=Binance # 企业微信推送里展示的账户备注 # BINANCE_ACCOUNT_LABEL=binance实盘账户 # 平仓盈亏估算:false=按仓位历史口径(已实现盈亏+手续费,不含资金费);true=含资金费 diff --git a/crypto_monitor_gate/.env.example b/crypto_monitor_gate/.env.example index 2d947d4..b6371fb 100644 --- a/crypto_monitor_gate/.env.example +++ b/crypto_monitor_gate/.env.example @@ -91,7 +91,7 @@ GATE_TPSL_PRICE_TYPE=0 # 仓位类 TP/SL 相对现价的最小间距(%),避免 Gate 1026「触发价须高于/低于现价」 GATE_TPSL_LAST_PRICE_GAP_PCT=0.05 # 页面与浏览器标签展示的交易所名称(多环境区分时可改成例如 Gate·模拟) -# EXCHANGE_DISPLAY_NAME=Gate.io +EXCHANGE_DISPLAY_NAME=Gate.io # ============================================================================= # 关键位程序自动下单(与 POSITION_SIZING_MODE 联动,修改后须重启 PM2) diff --git a/crypto_monitor_okx/.env.example b/crypto_monitor_okx/.env.example index ebef8c2..41b86d1 100644 --- a/crypto_monitor_okx/.env.example +++ b/crypto_monitor_okx/.env.example @@ -96,7 +96,7 @@ OKX_POSITION_INST_TYPE=SWAP # 单次拉取历史仓位条数上限(OKX 每页最多 100,程序会分页) # EXCHANGE_POSITION_HISTORY_LIMIT=200 # 页面与浏览器标签展示的交易所名称(多环境区分时可改成例如 OKX·测试网) -# EXCHANGE_DISPLAY_NAME=OKX +EXCHANGE_DISPLAY_NAME=OKX # 企业微信推送里展示的账户备注 # OKX_ACCOUNT_LABEL= diff --git a/deploy/pull_and_restart.sh b/deploy/pull_and_restart.sh index 257002f..f43c588 100644 --- a/deploy/pull_and_restart.sh +++ b/deploy/pull_and_restart.sh @@ -31,10 +31,11 @@ echo ">>> pm2 log policy (silence leftover + 3-day retain)" sed -i 's/\r$//' deploy/pm2_log_policy.sh 2>/dev/null || true bash deploy/pm2_log_policy.sh -echo ">>> pm2 restart" -pm2 restart crypto_gate crypto_binance crypto_okx manual-trading-hub manual-agent-gate 2>/dev/null \ - || pm2 restart crypto-monitor-gate crypto-monitor-binance crypto-monitor-okx manual-trading-hub 2>/dev/null \ - || pm2 restart all +echo ">>> pm2 restart --update-env" +# --update-env:避免 PM2 dump 里残留的跨实例环境变量(如 EXCHANGE_DISPLAY_NAME)继续污染 +pm2 restart crypto_gate crypto_binance crypto_okx manual-trading-hub manual-agent-gate --update-env 2>/dev/null \ + || pm2 restart crypto-monitor-gate crypto-monitor-binance crypto-monitor-okx manual-trading-hub --update-env 2>/dev/null \ + || pm2 restart all --update-env echo ">>> FORCE_CLOSE settings" grep -E '^FORCE_CLOSE_' crypto_monitor_gate/.env crypto_monitor_binance/.env crypto_monitor_okx/.env || true