← back to Filemaker Mcp
push-dashboard-revenue: wait for network before Cognito auth (boot-race exit=1, TK-12257)
a775694b9c3341759900e364d9f9e57a39939059 · 2026-09-25 13:17:40 -0700 · Steve Abrams
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D7LB6rCwpA7ubJTqYzqXEX
Files touched
M scripts/push-dashboard-revenue.sh
Diff
commit a775694b9c3341759900e364d9f9e57a39939059
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Fri Sep 25 13:17:40 2026 -0700
push-dashboard-revenue: wait for network before Cognito auth (boot-race exit=1, TK-12257)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D7LB6rCwpA7ubJTqYzqXEX
---
scripts/push-dashboard-revenue.sh | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/scripts/push-dashboard-revenue.sh b/scripts/push-dashboard-revenue.sh
index 8342d37..eb2dad5 100755
--- a/scripts/push-dashboard-revenue.sh
+++ b/scripts/push-dashboard-revenue.sh
@@ -5,6 +5,15 @@
# approved, run manually: zsh scripts/push-dashboard-revenue.sh
set -e
cd "$(dirname "$0")/.."
+# Boot race (TK-12257): launchd RunAtLoad fires at login before the network is up,
+# so Claris Cognito auth dies with "Network error" -> exit=1. Wait up to ~3 min for
+# the Cognito endpoint to answer (any HTTP code = reachable) before computing.
+for i in {1..18}; do
+ code=$(curl -s -o /dev/null -m 5 -w '%{http_code}' https://cognito-idp.us-west-2.amazonaws.com/ || true)
+ [[ "$code" != "000" ]] && break
+ echo "$(date -u +%FT%TZ) network not ready (attempt $i/18), waiting 10s" >&2
+ sleep 10
+done
node scripts/dashboard-revenue.mjs
# keep the LOCAL committed copy fresh too, so local :9770 and git don't drift from prod
cp /tmp/fmpro-revenue.json "$HOME/Projects/ads-dashboard/data/fmpro.json" 2>/dev/null || true
← 84dbe50 document invoice monitor launchd recovery proof
·
back to Filemaker Mcp
·
(newest)