chore: track precompute and ops scripts; move monitor proxy into .env
The monitor start script used to embed the proxy URL with credentials, which kept scripts/ out of git. It now reads QUANT_MARKET_PROXY from the untracked repo-root .env. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
23
scripts/start-monitor.sh
Executable file
23
scripts/start-monitor.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
# Long-running live-trader monitor (US + CN, all strategies).
|
||||
# Started by the quant-monitor.service systemd --user unit; replaces the
|
||||
# old "tmux new -s quant; uv run python trader.py monitor" workflow.
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
PROJECT_ROOT="$( cd "$SCRIPT_DIR/.." && pwd )"
|
||||
cd "$PROJECT_ROOT"
|
||||
|
||||
# uv lives in ~/.local/bin, which is not on systemd's default PATH.
|
||||
export PATH="/home/gahow/.local/bin:$PATH"
|
||||
|
||||
# Market data is fetched through the lab proxy (same as interactive `proxyOn`).
|
||||
# QUANT_MARKET_PROXY lives in the untracked repo-root .env.
|
||||
if [[ -f .env ]]; then
|
||||
set -a; source .env; set +a
|
||||
fi
|
||||
if [[ -n "${QUANT_MARKET_PROXY:-}" ]]; then
|
||||
export http_proxy="$QUANT_MARKET_PROXY" https_proxy="$QUANT_MARKET_PROXY" all_proxy="$QUANT_MARKET_PROXY"
|
||||
fi
|
||||
|
||||
exec uv run python trader.py monitor
|
||||
Reference in New Issue
Block a user