[object Object]

← back to Designer Wallcoverings

auto-save: 2026-07-16T07:11:48 (4 files) — DW-Programming/color-enrich-newskus.sh pending-approval/boost-filter-consolidation-2026-06-25 scripts/pr-contact-for-price vendor-scrapers/china-seas-refresh

9ce2eb7e9703ff3fb41fbd2966bd4c59812cbf16 · 2026-07-16 07:11:53 -0700 · Steve Abrams

Files touched

Diff

commit 9ce2eb7e9703ff3fb41fbd2966bd4c59812cbf16
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Thu Jul 16 07:11:53 2026 -0700

    auto-save: 2026-07-16T07:11:48 (4 files) — DW-Programming/color-enrich-newskus.sh pending-approval/boost-filter-consolidation-2026-06-25 scripts/pr-contact-for-price vendor-scrapers/china-seas-refresh
---
 DW-Programming/color-enrich-newskus.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/DW-Programming/color-enrich-newskus.sh b/DW-Programming/color-enrich-newskus.sh
index 47d43bd9..89eaf25f 100755
--- a/DW-Programming/color-enrich-newskus.sh
+++ b/DW-Programming/color-enrich-newskus.sh
@@ -15,6 +15,16 @@ export PATH="/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin"
 export NODE_PATH="$HOME/Projects/all-designerwallcoverings/node_modules"
 export SHOPIFY_ADMIN_TOKEN="$(grep -E '^SHOPIFY_ADMIN_TOKEN=' "$HOME/Projects/secrets-manager/.env" | head -1 | cut -d= -f2- | tr -d '"'\'' \r')"
 
+# WEEKLY (Sundays): self-heal stale mirror image URLs. Products whose Shopify
+# image was re-uploaded/renamed leave a dead CDN URL in the mirror → the enricher
+# quarantines them as 'no-palette'. This pulls the CURRENT featured image from
+# live Shopify, rewrites it to the queue + mirror, and clears the quarantine so
+# they re-enrich in the SAME run below. Best-effort: never aborts the daily chain.
+if [ "$(date +%u)" = "7" ]; then
+  echo "[$(date '+%F %T')] weekly: refreshing stale/broken image URLs from live Shopify…"
+  node refresh-broken-images.js || echo "[$(date '+%F %T')] [WARN] image refresh exited $? — continuing daily chain"
+fi
+
 echo "[$(date '+%F %T')] enqueue new never-enriched active+published SKUs…"
 psql -h /tmp -d dw_unified -c "
 INSERT INTO color_enrich_todo (numeric_id, image_url, title)

← df470f64 auto-save: 2026-07-16T05:41:28 (4 files) — pending-approval/  ·  back to Designer Wallcoverings  ·  auto-save: 2026-07-16T07:41:55 (4 files) — pending-approval/ 719c0e6e →