From 0490f5d357808a348e31c790e06727e7f4943a37 Mon Sep 17 00:00:00 2001 From: codex Date: Fri, 15 May 2026 12:36:22 +0800 Subject: [PATCH] Release testbox auto deploy lock each tick --- testbox/scripts/auto-pull-restart.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/testbox/scripts/auto-pull-restart.sh b/testbox/scripts/auto-pull-restart.sh index 5cdaffb..dec845d 100755 --- a/testbox/scripts/auto-pull-restart.sh +++ b/testbox/scripts/auto-pull-restart.sh @@ -240,9 +240,11 @@ run_once() { local java_before java_after local services_line + exec 9>&- 2>/dev/null || true exec 9>"$LOCK_FILE" if ! flock -n 9; then log "deploy lock busy; skip this tick" + exec 9>&- return 0 fi @@ -301,6 +303,9 @@ run_once() { rc=$? [ "$rc" -eq 10 ] || log "admin update skipped due to error rc=$rc" fi + + flock -u 9 + exec 9>&- } usage() {