From 4bb5e67e824b6e8ffa609770c27595479cbde8aa Mon Sep 17 00:00:00 2001 From: sergio Date: Mon, 29 Jun 2026 10:35:19 -0400 Subject: [PATCH] =?UTF-8?q?Etapa=20G:=20harvest-go=20sale=20temprano=20si?= =?UTF-8?q?=20la=20cola=20est=C3=A1=20vac=C3=ADa=20(evita=20rsync=20del=20?= =?UTF-8?q?store=20de=20GB=20en=20balde)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/farm/harvest-go.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/farm/harvest-go.sh b/scripts/farm/harvest-go.sh index b4982b5a..881ade73 100755 --- a/scripts/farm/harvest-go.sh +++ b/scripts/farm/harvest-go.sh @@ -50,6 +50,10 @@ trap 'rmdir "$LOCK" 2>/dev/null' EXIT INT TERM echo "==================================================================" echo "$(STAMP) harvest-go: arranco (VPS=$VPS)" +# 0. GUARD: si la cola está vacía, no hay nada que cosechar ⇒ salgo ANTES del rsync del store (que ya +# es de varios GB y tardaría minutos en balde). El cron no-opea barato hasta que haya combustible nuevo. +ls "$QUEUE"/*.toml >/dev/null 2>&1 || { echo "$(STAMP) cola $QUEUE vacía ⇒ nada que cosechar, salgo"; exit 0; } + # 1. sincronizar con el otro agente (mismo main). --autostash por si quedó algo sin commitear. git pull --rebase --autostash origin main 2>&1 | tail -2 || echo "$(STAMP) WARN: git pull falló (sigo)"