Silence Flask access logs and retain PM2 logs for 3 days.
Stop werkzeug request spam into PM2 error files, truncate oversized logs, and install daily logrotate with 3-day retention. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -23,10 +23,14 @@ echo ">>> force-close policy: gate=ON, binance/okx=OFF"
|
||||
python3 scripts/sync_common_trading_env.py --apply-force-close-policy "${DRY[@]}"
|
||||
|
||||
if [[ ${#DRY[@]} -gt 0 ]]; then
|
||||
echo "(dry-run, skip pm2 restart)"
|
||||
echo "(dry-run, skip pm2 log policy + restart)"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
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 \
|
||||
|
||||
Reference in New Issue
Block a user