Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
Fix for dead gateways zero
Browse files Browse the repository at this point in the history
  • Loading branch information
aquarat committed Jan 31, 2024
1 parent 6cf957e commit 5b31ecf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/alerting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,11 @@ export const recordGatewayResponseSuccess = async (templateId: string, gatewayUr
.map((gateway) => findGateway(airnodeAddress, gateway.url)?.badTries ?? 0)
.filter((badTries) => badTries > GATEWAYS_BAD_TRIES_AFTER_WHICH_CONSIDERED_DEAD).length;

if (newGatewayResultStatus.badTries > GATEWAYS_BAD_TRIES_AFTER_WHICH_CONSIDERED_DEAD) {
if (
newGatewayResultStatus.badTries > GATEWAYS_BAD_TRIES_AFTER_WHICH_CONSIDERED_DEAD &&
deadGateways > 0 &&
allGatewaysCount < deadGateways
) {
limitedSendToOpsGenieLowLevel(
{
message: `Dead gateway for Airnode Address ${airnodeAddress}`,
Expand Down

0 comments on commit 5b31ecf

Please sign in to comment.