#!/bin/bash
# 烛龙守护进程 — 崩溃自动重启
cd /root/quant_pipeline
export $(grep -v '^#' /root/.hermes/.env | xargs)
while true; do
    PYTHONUNBUFFERED=1 python3 candle_bot.py >> /tmp/candle_bot.log 2>&1
    echo "[$(date '+%Y-%m-%d %H:%M:%S')] ⚠️ Bot退出，10秒后重启..." >> /tmp/candle_bot.log
    sleep 10
done
