fix: clear P0/P1 alerts after early send to prevent duplicate Matrix messages
After sending P0/P1 alerts immediately, reset the variables so they are excluded from the final consolidated ALL_ALERTS send at the end of the script. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
5632138cc3
commit
1c93267193
1 changed files with 2 additions and 0 deletions
|
|
@ -145,6 +145,7 @@ fi
|
|||
if [ -n "$P0_ALERTS" ]; then
|
||||
matrix_send "supervisor" "🚨 Supervisor P0 alerts:
|
||||
$(printf '%b' "$P0_ALERTS")" 2>/dev/null || true
|
||||
P0_ALERTS="" # clear so it is not duplicated in the final consolidated send
|
||||
fi
|
||||
|
||||
# =============================================================================
|
||||
|
|
@ -194,6 +195,7 @@ fi
|
|||
if [ -n "$P1_ALERTS" ]; then
|
||||
matrix_send "supervisor" "⚠️ Supervisor P1 alerts:
|
||||
$(printf '%b' "$P1_ALERTS")" 2>/dev/null || true
|
||||
P1_ALERTS="" # clear so it is not duplicated in the final consolidated send
|
||||
fi
|
||||
|
||||
# Emit infra metric
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue