[object Object]

← back to Homesonspec

lennar: durable Mac-side refresh runner (keepalive tunnel + state-by-state pipeline)

e70a69b538595ae297bc71ea1f3164ed2243a023 · 2026-07-29 08:58:22 -0700 · Steve Abrams

Ongoing Lennar freshness routed through the Mac (unblocked IP) since lennar.com
403-blocks Kamatera. Self-establishes a keepalive tunnel, refreshes each Lennar
state via the real pipeline, tears down. Intended for a Mac launchd schedule
(gated setup — drafted for Steve). CA already refreshed manually this session (1,684 imaged).

Files touched

Diff

commit e70a69b538595ae297bc71ea1f3164ed2243a023
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Wed Jul 29 08:58:22 2026 -0700

    lennar: durable Mac-side refresh runner (keepalive tunnel + state-by-state pipeline)
    
    Ongoing Lennar freshness routed through the Mac (unblocked IP) since lennar.com
    403-blocks Kamatera. Self-establishes a keepalive tunnel, refreshes each Lennar
    state via the real pipeline, tears down. Intended for a Mac launchd schedule
    (gated setup — drafted for Steve). CA already refreshed manually this session (1,684 imaged).
---
 ops/lennar-mac-refresh.sh | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/ops/lennar-mac-refresh.sh b/ops/lennar-mac-refresh.sh
new file mode 100755
index 00000000..36f42afa
--- /dev/null
+++ b/ops/lennar-mac-refresh.sh
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+# DURABLE Lennar freshness via the Mac (routes around lennar.com's 403 block on Kamatera's IP).
+# Self-establishes a keepalive SSH tunnel to Kamatera PG, runs the Lennar pipeline state-by-state
+# (throttled, polite), then tears the tunnel down. Intended to run on a Mac launchd schedule.
+# Live homes get re-verified + imaged; delisted homes age out via the normal freshness cadence.
+set -uo pipefail
+cd /Users/macstudio3/Projects/homesonspec/apps/workers
+export PATH=$PATH:/usr/local/bin
+LOG=/tmp/lennar-mac-refresh.log; : > "$LOG"
+echo "=== Lennar Mac refresh $(date) ===" >> "$LOG"
+# 1. keepalive tunnel
+pkill -f "5433:localhost:5432" 2>/dev/null; sleep 1
+ssh -f -N -o ServerAliveInterval=30 -o ServerAliveCountMax=1000000 -o ExitOnForwardFailure=yes -L 5433:localhost:5432 root@45.61.58.125
+sleep 2
+pgrep -f "5433:localhost:5432" >/dev/null || { echo "TUNNEL FAILED" >> "$LOG"; exit 1; }
+export DATABASE_URL="postgresql://homesonspec:40b5436179ee30580aec75a1da1bffc2@localhost:5433/homesonspec"
+# 2. refresh each Lennar state (bounded, sequential = polite). Full national list.
+for S in california texas florida arizona colorado nevada north-carolina south-carolina georgia          alabama arkansas delaware tennessee oregon washington oklahoma new-jersey pennsylvania          virginia maryland new-york minnesota indiana; do
+  echo "--- $S ---" >> "$LOG"
+  LENNAR_STATE_FILTER=$S LENNAR_PAGE_LIMIT=100000 FORCE_REEXTRACT=1     npx tsx src/cli.ts --adapter=lennar-site 2>&1 | grep -E '"published"|"pages"|Error' >> "$LOG"
+done
+# 3. teardown
+pkill -f "5433:localhost:5432" 2>/dev/null
+echo "=== done $(date) ===" >> "$LOG"

← 0fbdefeb build-loop: add Dream Finders to the throttled sweep rotatio  ·  back to Homesonspec  ·  auto-save: 2026-07-29T09:07:36 (1 files) — collectors/mattam 718fc16b →