ops: math-fix watcher grep per-run output, not cumulative log (cumulative grep re-matched first queue-busy -> 173-iteration relaunch loop, passes 4-58 no-ops)
This commit is contained in:
1 parent
e05907c47e
commit
f46738bb8a
1 file changed
+5
-2
@@ -8,9 +8,12 @@ for i in $(seq 1 240); do
|
|||||||
if pgrep -f "dsh-run" >/dev/null; then sleep 60; continue; fi
|
if pgrep -f "dsh-run" >/dev/null; then sleep 60; continue; fi
|
||||||
if ! git diff --quiet || [ -n "$(git status --porcelain --untracked-files=normal | grep -v '^?? ')" ]; then sleep 60; continue; fi
|
if ! git diff --quiet || [ -n "$(git status --porcelain --untracked-files=normal | grep -v '^?? ')" ]; then sleep 60; continue; fi
|
||||||
echo "[watcher] launching math-fix job (iteration $i)" | tee -a "$LOG"
|
echo "[watcher] launching math-fix job (iteration $i)" | tee -a "$LOG"
|
||||||
~/.local/bin/dsh-run /home/ubuntu/projects/retire-planner "$PROMPT" >> "$LOG" 2>&1
|
RUNLOG=$(mktemp /tmp/math-fix-run.XXXXXX)
|
||||||
|
~/.local/bin/dsh-run /home/ubuntu/projects/retire-planner "$PROMPT" > "$RUNLOG" 2>&1
|
||||||
rc=$?
|
rc=$?
|
||||||
if grep -q "DSH_QUEUE_BUSY" "$LOG"; then echo "[watcher] queue busy, retrying" | tee -a "$LOG"; sleep 60; continue; fi
|
cat "$RUNLOG" >> "$LOG"
|
||||||
|
if grep -q "DSH_QUEUE_BUSY" "$RUNLOG"; then echo "[watcher] queue busy, retrying" | tee -a "$LOG"; rm -f "$RUNLOG"; sleep 60; continue; fi
|
||||||
|
rm -f "$RUNLOG"
|
||||||
echo "[watcher] math-fix job finished rc=$rc" | tee -a "$LOG"
|
echo "[watcher] math-fix job finished rc=$rc" | tee -a "$LOG"
|
||||||
exit $rc
|
exit $rc
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in new issue
Block a user