[object Object]

← back to Designer Wallcoverings

harden hero pipeline: global 45s socket timeout (no hung sockets) + unbuffered progress

4f5bbe67496ee7792d58924f108aa128d062648b · 2026-06-23 13:20:56 -0700 · Steve

Files touched

Diff

commit 4f5bbe67496ee7792d58924f108aa128d062648b
Author: Steve <steve@designerwallcoverings.com>
Date:   Tue Jun 23 13:20:56 2026 -0700

    harden hero pipeline: global 45s socket timeout (no hung sockets) + unbuffered progress
---
 shopify/collection-hero-pipeline.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/shopify/collection-hero-pipeline.py b/shopify/collection-hero-pipeline.py
index 4981983c..5954aff1 100644
--- a/shopify/collection-hero-pipeline.py
+++ b/shopify/collection-hero-pipeline.py
@@ -40,6 +40,13 @@ Flags:
   --resume          merge into an existing manifest, skip already-resolved handles
 """
 import sys, os, json, time, re, argparse, datetime, urllib.request, urllib.parse, urllib.error
+import socket, functools
+
+# Hard global socket timeout so no TLS handshake / read can hang the run
+# indefinitely (a stuck CDN/Gemini socket froze an earlier full pass). Every
+# urlopen below also passes an explicit timeout; this is the belt-and-braces.
+socket.setdefaulttimeout(45)
+print = functools.partial(print, flush=True)  # never buffer progress
 
 STORE = "designer-laboratory-sandbox.myshopify.com"
 API = "2024-10"

← 8bb35f8f hero manifest finalizer: socket-timeout hardening reuse + pr  ·  back to Designer Wallcoverings  ·  auto-save: 2026-06-23T13:21:53 (14 files) — shopify/tres-tin 9b9bd6e0 →