← back to Settlement Prescan
run-full.sh
18 lines
#!/usr/bin/env bash
# Detached resumable full settlement pre-scan runner.
# Scans ONLY rows where settlement_verdict IS NULL (resumable — safe to re-run).
# $0 local (Mac1 Ollama qwen2.5vl). Writes only to the 3 staging tables.
set -euo pipefail
cd "$(dirname "$0")"
LOG="$PWD/scan-full.log"
echo "=== full pre-scan launch $(date -u +%FT%TZ) ===" >> "$LOG"
# Guarantee VRAM headroom: unload qwen3:14b so the 7B vision model fits.
curl -s http://192.168.1.133:11434/api/generate \
-d '{"model":"qwen3:14b","keep_alive":0,"prompt":""}' --max-time 20 >/dev/null 2>&1 || true
# Scan all NULL rows across all 3 tables (no --limit).
node scan.mjs >> "$LOG" 2>&1
echo "=== full pre-scan finished $(date -u +%FT%TZ) ===" >> "$LOG"