fix(books-backup): exit 3 → on_error в if-блоках ES-snapshot (иначе trap ERR молчит, уведомления не шлются) — инцидент 2026-08-29
This commit is contained in:
@@ -139,7 +139,7 @@ SNAP_RESULT=$(docker exec elasticsearch curl -sS -X PUT \
|
||||
echo "ES snapshot result: $SNAP_RESULT"
|
||||
if ! echo "$SNAP_RESULT" | grep -q '"state":"SUCCESS"'; then
|
||||
echo "ES snapshot did NOT report SUCCESS state — failing"
|
||||
exit 3
|
||||
on_error $LINENO 3
|
||||
fi
|
||||
|
||||
echo "--- prune ES snapshots older than $RETENTION_DAYS ---"
|
||||
@@ -168,7 +168,7 @@ BSNAP_RESULT=$(docker exec bookva-es curl -sS -X PUT \
|
||||
echo "bookva-es snapshot result: $BSNAP_RESULT"
|
||||
if ! echo "$BSNAP_RESULT" | grep -q '"state":"SUCCESS"'; then
|
||||
echo "bookva-es snapshot did NOT report SUCCESS state — failing"
|
||||
exit 3
|
||||
on_error $LINENO 3
|
||||
fi
|
||||
|
||||
echo "--- prune bookva-es snapshots older than $RETENTION_DAYS ---"
|
||||
|
||||
Reference in New Issue
Block a user