diff --git a/batch-extract-50.sh b/batch-extract-50.sh index cb31402..15112d2 100755 --- a/batch-extract-50.sh +++ b/batch-extract-50.sh @@ -262,11 +262,15 @@ Pentagon-Agent: Epimetheus <3D35839A-7722-4740-B93D-51157F7D5E70>" >> $LOG 2>&1 git commit -m "pipeline: archive $BASENAME after extraction Pentagon-Agent: Epimetheus <3D35839A-7722-4740-B93D-51157F7D5E70>" >> $LOG 2>&1 + PUSH_OK=0 for attempt in 1 2 3; do git pull --rebase origin main >> $LOG 2>&1 - git push origin main >> $LOG 2>&1 && break + git push origin main >> $LOG 2>&1 && { PUSH_OK=1; break; } sleep 1 done + if [ "$PUSH_OK" -eq 0 ]; then + echo " -> WARNING: archive commit for $BASENAME failed to push after 3 attempts" >> $LOG + fi cd $REPO git fetch origin main >> $LOG 2>&1 git reset --hard origin/main >> $LOG 2>&1