← back to Nas Setup
pull-dw-dump: write per-DB heartbeat latest-<db>.json so dw_unified vs realestate health don't overwrite the shared latest.json (TK-10547)
b1e42e20aceaece2c08b8159cf47e7e5b3206b9c · 2026-08-13 21:03:09 -0700 · Steve
Files touched
M scripts/pull-dw-dump.sh
Diff
commit b1e42e20aceaece2c08b8159cf47e7e5b3206b9c
Author: Steve <steve@designerwallcoverings.com>
Date: Thu Aug 13 21:03:09 2026 -0700
pull-dw-dump: write per-DB heartbeat latest-<db>.json so dw_unified vs realestate health don't overwrite the shared latest.json (TK-10547)
---
scripts/pull-dw-dump.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/scripts/pull-dw-dump.sh b/scripts/pull-dw-dump.sh
index e3fe740..201efe3 100755
--- a/scripts/pull-dw-dump.sh
+++ b/scripts/pull-dw-dump.sh
@@ -157,6 +157,7 @@ if [ "$OK_COUNT" -eq 0 ]; then
alert "no on-prem destination received a verified copy of $BASE"
jq -n --arg base "$BASE" --argjson dests "$DESTS_ARR" \
'{pulled_at:(now|todate),dump:$base,destinations:$dests,verdict:"FAIL"}' > "$LATEST"
+ cp "$LATEST" "${LATEST%/*}/latest-${BASE%%_[0-9]*}.json" 2>/dev/null || true # per-DB heartbeat (TK-10547) — shared latest.json alone is ambiguous when >1 DB mirrors
exit 1
fi
@@ -168,5 +169,6 @@ fi
jq -n --arg base "$BASE" --argjson dests "$DESTS_ARR" --arg verdict "$VERDICT" \
'{pulled_at:(now|todate),dump:$base,destinations:$dests,ok:($dests|length),verdict:$verdict}' > "$LATEST"
+cp "$LATEST" "${LATEST%/*}/latest-${BASE%%_[0-9]*}.json" 2>/dev/null || true # per-DB heartbeat (TK-10547)
log "✓ mirror complete ($VERDICT) — $OK_COUNT verified, $SKIP_COUNT skipped"
exit 0
← e1954e8 daemon-health: emit PASS/WARN/FAIL JSON heartbeat + guarded
·
back to Nas Setup
·
daemon-health --alert: add de-nag (fire only on worsening tr 1a0f985 →