Skip to main content

max / makenotwork

sando: soak-pause flag for the testnot refresh The daily testnot mirror refresh now no-ops while /srv/sando/testnot-refresh.paused exists, so a multi-day soak's data + feature state stay stable. touch to pause, rm to resume. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-06-07 23:32 UTC
Commit: 318958e0fa54b9f1dff920d3a4c4847cabcbe5e0
Parent: 27e2541
1 file changed, +10 insertions, -0 deletions
@@ -21,10 +21,20 @@ BACKUP="${TESTNOT_BACKUP:-/srv/sando/backups/latest.sql.gz}"
21 21 SSH_TARGET="${TESTNOT_SSH:-root@testnot}"
22 22 DB="${TESTNOT_DB:-makenotwork}"
23 23 SERVICE="makenotwork.service"
24 + # Soak-pause: while this flag file exists, the refresh is a no-op so a
25 + # multi-day soak's data + feature state stay stable. Pause/resume:
26 + # touch /srv/sando/testnot-refresh.paused # pause
27 + # rm /srv/sando/testnot-refresh.paused # resume
28 + PAUSE_FLAG="${TESTNOT_REFRESH_PAUSE:-/srv/sando/testnot-refresh.paused}"
24 29
25 30 log() { echo "[$(date -u +%H:%M:%S)] $*"; }
26 31 ts_ssh() { tailscale ssh "$SSH_TARGET" "$@"; }
27 32
33 + if [ -e "$PAUSE_FLAG" ]; then
34 + log "refresh paused ($PAUSE_FLAG present) — skipping to keep the soak stable"
35 + exit 0
36 + fi
37 +
28 38 [ -r "$BACKUP" ] || { echo "backup not readable: $BACKUP" >&2; exit 1; }
29 39 log "backup: $BACKUP ($(stat -c %s "$BACKUP") bytes)"
30 40