← back to Nationalrealestate
Fix refresh-commercial Ollama check: curl -sf + grep models (prod :11434 404 no longer triggers briefs)
f5468f101dd173e25977860dcf6c0f08f31b594e · 2026-07-22 10:33:15 -0700 · Steve
Files touched
M scripts/refresh-commercial.sh
Diff
commit f5468f101dd173e25977860dcf6c0f08f31b594e
Author: Steve <steve@designerwallcoverings.com>
Date: Wed Jul 22 10:33:15 2026 -0700
Fix refresh-commercial Ollama check: curl -sf + grep models (prod :11434 404 no longer triggers briefs)
---
scripts/refresh-commercial.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/scripts/refresh-commercial.sh b/scripts/refresh-commercial.sh
index cdcc75b..876096b 100755
--- a/scripts/refresh-commercial.sh
+++ b/scripts/refresh-commercial.sh
@@ -20,7 +20,9 @@ npm run ingest:commercial -- la >> "$LOG" 2>&1 \
&& echo "[ok] la commercial parcels refreshed" >> "$LOG" \
|| echo "[skip/FAIL] la commercial (sqlite may be absent on this host)" >> "$LOG"
-if curl -s --max-time 3 "${OLLAMA_URL:-http://127.0.0.1:11434}/api/tags" >/dev/null 2>&1; then
+# -f fails on non-2xx (prod's :11434 answers 404 — must NOT count as Ollama), and the
+# body must actually be an Ollama tags response, else skip briefs cleanly.
+if curl -sf --max-time 3 "${OLLAMA_URL:-http://127.0.0.1:11434}/api/tags" 2>/dev/null | grep -q '"models"'; then
npm run ingest:commercial-briefs >> "$LOG" 2>&1 \
&& echo "[ok] briefs regenerated (Ollama present)" >> "$LOG" \
|| echo "[FAIL] briefs" >> "$LOG"
← 2bfd4ff Add refresh-commercial.sh — daily refresh of CA DRE registry
·
back to Nationalrealestate
·
refresh-commercial: gate briefs on actual model name (prod h 701cb10 →