Fix exchange display names polluted by shared PM2 env.

Require EXCHANGE_DISPLAY_NAME in each instance .env.example and restart with --update-env so Binance/Gate no longer inherit OKX.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-15 16:30:44 +08:00
parent 944a211e4a
commit ec30a3999c
4 changed files with 8 additions and 7 deletions
+5 -4
View File
@@ -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