[object Object]

← back to Dw Five Field Step0

drain: own 'backlog' budget category (500/day) + hourly even cadence (~30/slot)

2359edcb9e036b9fd5b65c038811dce1423bc939 · 2026-06-21 18:28:47 -0700 · Steve

Files touched

Diff

commit 2359edcb9e036b9fd5b65c038811dce1423bc939
Author: Steve <steve@designerwallcoverings.com>
Date:   Sun Jun 21 18:28:47 2026 -0700

    drain: own 'backlog' budget category (500/day) + hourly even cadence (~30/slot)
---
 bulk-fivefield-exec.py | 2 +-
 drain.sh               | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/bulk-fivefield-exec.py b/bulk-fivefield-exec.py
index 22605c5..dfaddef 100644
--- a/bulk-fivefield-exec.py
+++ b/bulk-fivefield-exec.py
@@ -39,7 +39,7 @@ OUTDIR = "/Users/stevestudio2/Projects/dw-five-field-step0/out"
 RESULT = os.path.join(OUTDIR, "bulk-fivefield-result.json")
 SAMPLE_PRICE = "4.25"
 BUDGET = os.path.expanduser("~/Projects/designerwallcoverings/scripts/variant-budget/budget.cjs")
-BUDGET_CAT = "upload"   # DTD verdict A: share the live cadence ledger category
+BUDGET_CAT = "backlog"  # 2026-06-21 EVEN 50/50: own reserved 500/day category (was 'upload', which the cadence starved to ~140/day)
 NODE = "/opt/homebrew/bin/node" if os.path.exists("/opt/homebrew/bin/node") else "node"
 
 tok = subprocess.check_output(
diff --git a/drain.sh b/drain.sh
index d03bba1..1d20302 100644
--- a/drain.sh
+++ b/drain.sh
@@ -34,8 +34,11 @@ if [ "$TOTAL" -gt 0 ] && [ "$DONE" -ge "$TOTAL" ]; then
   exit 0
 fi
 
-# run one budget-capped batch (default --max = today's leftover upload headroom)
-python3 "$EXE" >>"$LOG" 2>&1
+# run one SMALL per-slot batch so the day's 500 'backlog' budget spreads evenly
+# across the 24 hourly slots (~21/slot) instead of bursting at once. The shared
+# budget.cjs 'backlog' category still hard-caps the daily total at 500.
+SLOT_MAX="${DW_BACKLOG_SLOT_MAX:-30}"
+python3 "$EXE" --max "$SLOT_MAX" >>"$LOG" 2>&1
 RC=$?
 DONE2=$(node -e 'try{const r=require(process.argv[1]);console.log(r.filter(x=>x.status==="fixed"||x.status==="skipped").length)}catch(e){console.log(0)}' "$RESULT" 2>/dev/null || echo 0)
 echo "[$(ts)] drain end rc=$RC — now done=$DONE2 / total=$TOTAL (this run +$((DONE2-DONE)))" >>"$LOG"

← be75fa3 5-field drain: vendor round-robin order — activate across as  ·  back to Dw Five Field Step0  ·  threads canary verification script - all 20 SKUs verified li e7b01d0 →