feat(manage): source .env before starting uvicorn
Enables TURNSTONE_MULTI_AGENT_DIAGNOSE and other env vars set in .env to reach the running process without manual export. Variables already set in the caller's environment take precedence.
This commit is contained in:
parent
ddd95137a8
commit
5be4bc1519
1 changed files with 9 additions and 0 deletions
|
|
@ -38,6 +38,15 @@ PATTERN_DIR="${TURNSTONE_PATTERNS:-$([[ -d /devl/turnstone-cluster/patterns ]] &
|
|||
CONDA_BASE="${CONDA_BASE:-/devl/miniconda3}"
|
||||
PYTHON="${CONDA_BASE}/envs/cf/bin/python"
|
||||
|
||||
# Source .env if present — loads TURNSTONE_MULTI_AGENT_DIAGNOSE, GPU_SERVER_URL, etc.
|
||||
# Variables already set in the environment take precedence (set -a / set +a scoping).
|
||||
if [[ -f "${SCRIPT_DIR}/.env" ]]; then
|
||||
set -a
|
||||
# shellcheck source=/dev/null
|
||||
source "${SCRIPT_DIR}/.env"
|
||||
set +a
|
||||
fi
|
||||
|
||||
# ── Helpers ───────────────────────────────────────────────────────────────────
|
||||
|
||||
_is_alive() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue