Download _backup/scripts/restart_formula.sh from TrendeX90/ca-cube: direct link, hf CLI and curl.
- Browser
- Download file 602 Bytes
-
https://huggingface.co/datasets/TrendeX90/ca-cube/resolve/main/_backup/scripts/restart_formula.sh
- Command line
-
hf download hf://datasets/TrendeX90/ca-cube/_backup/scripts/restart_formula.sh
-
curl -L -o restart_formula.sh https://huggingface.co/datasets/TrendeX90/ca-cube/resolve/main/_backup/scripts/restart_formula.sh
602 Bytes
| # Stop a running formula job (runner + python pipeline), then start it again on the latest backend commit. | |
| me=$$ | |
| for pid in $(pgrep -f "scripts/run_formula.sh") $(pgrep -f "pipeline.build"); do | |
| [ "$pid" = "$me" ] && continue | |
| kill "$pid" 2>/dev/null && echo "killed $pid" | |
| done | |
| sleep 3 | |
| pgrep -fa "pipeline.build" | grep -v restart_formula || echo "formula stopped" | |
| cd /root/trendex-ca | |
| [ -f logs/formula.log ] && mv logs/formula.log "logs/formula_$(date +%H%M%S).log" | |
| setsid nohup bash scripts/run_formula.sh < /dev/null > logs/formula.log 2>&1 & | |
| sleep 15 | |
| head -3 logs/formula.log | |