[object Object]

← back to Homesonspec

build-loop: add Lennar (state-iterating) + Toll Brothers (national) to ingestion rotation — keep ingesting

b9c9bbc3abc0417e121582bb0df508e82d71072a · 2026-07-28 09:36:08 -0700 · Steve Abrams

Files touched

Diff

commit b9c9bbc3abc0417e121582bb0df508e82d71072a
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Tue Jul 28 09:36:08 2026 -0700

    build-loop: add Lennar (state-iterating) + Toll Brothers (national) to ingestion rotation — keep ingesting
---
 scripts/build-loop.sh | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/scripts/build-loop.sh b/scripts/build-loop.sh
index 2d0c4bb2..4e3dbad3 100644
--- a/scripts/build-loop.sh
+++ b/scripts/build-loop.sh
@@ -57,14 +57,19 @@ sweep_adapter() {
       drh) DRHORTON_STATE="$(slug "$S")"  DRHORTON_PAGE_LIMIT=$CAP  CLI dr-horton-site  | sed "s/^/  drh $S: /" ;;
       plt) PULTE_STATE="$(fullname "$S")" PULTE_PAGE_LIMIT=$CAP     CLI pultegroup-site | sed "s/^/  plt $S: /" ;;
       tri) TRIPOINTE_STATE="$(lc "$S")"   TRIPOINTE_PAGE_LIMIT=$CAP CLI tri-pointe-site | sed "s/^/  tri $S: /" ;;
+      len) LENNAR_STATE="$S"              LENNAR_PAGE_LIMIT=$CAP    CLI lennar-site     | sed "s/^/  len $S: /" ;;
     esac
   done
 }
 
+# national adapters (single feed, no per-state param) — run ONCE per sweep, not per-state,
+# so we don't hammer the same national endpoint 40x. Toll Brothers publishes ~all in one run.
+sweep_national() { CLI toll-brothers-site | sed "s/^/  tol NATIONAL: /"; }
+
 # wait until no other adapter run is in flight (avoid same-source races)
 while pgrep -f "cli.ts --adapter" 2>/dev/null | grep -qv "^$$\$"; do sleep 20; done
 
-for k in dr-horton-site kb-home-site pultegroup-site tri-pointe-site; do
+for k in dr-horton-site kb-home-site pultegroup-site tri-pointe-site lennar-site toll-brothers-site; do
   PSQL "update \"SourceRegistry\" set active=true, health='HEALTHY', \"consecutiveFailures\"=0 where key='$k';" >/dev/null
 done
 
@@ -74,11 +79,13 @@ while [ ! -f "$STOP" ] && [ "$sweep" -lt "$MAX_SWEEPS" ]; do
   s0=$(PSQL "select count(*) from \"InventoryHome\" where status='PUBLISHED';")
   b0=$(PSQL "select count(distinct \"builderId\") from \"InventoryHome\" where status='PUBLISHED';")
   LOG "===== SWEEP $sweep/$MAX_SWEEPS start: $s0 homes / $b0 builders ====="
-  LOG "fanning out 4 adapters in parallel across ${CAP}-deep states (West Coast first)"
+  LOG "fanning out 5 state adapters + Toll(national) in parallel across ${CAP}-deep states (West Coast first)"
   sweep_adapter kb  &
   sweep_adapter drh &
   sweep_adapter plt &
   sweep_adapter tri &
+  sweep_adapter len &
+  sweep_national    &
   wait
   # drain enrichment queue (bigger batches for speed)
   for i in $(seq 1 60); do

← 8873056b auto-save: 2026-07-28T09:29:05 (1 files) — apps/workers/var/  ·  back to Homesonspec  ·  build-loop: throttle Toll (communities-only) to every 8th sw de3e088d →