Skip to content

Commit

Permalink
Change to inc and dec
Browse files Browse the repository at this point in the history
  • Loading branch information
ogtownsend committed Feb 21, 2024
1 parent 3ede80e commit 3543f86
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -676,8 +676,8 @@ func (r *logRecoverer) addPending(payload ocr2keepers.UpkeepPayload) error {
}
if !exist {
r.pending = append(pending, payload)
prommetrics.AutomationRecovererPendingPayloads.Inc()
}
prommetrics.AutomationRecovererPendingPayloads.Set(float64(len(r.pending)))
return nil
}

Expand All @@ -688,10 +688,11 @@ func (r *logRecoverer) removePending(workID string) {
for _, p := range r.pending {
if p.WorkID != workID {
updated = append(updated, p)
} else {
prommetrics.AutomationRecovererPendingPayloads.Dec()
}
}
r.pending = updated
prommetrics.AutomationRecovererPendingPayloads.Set(float64(len(r.pending)))
}

// sortPending sorts the pending list by a random order based on the normalized latest block number.
Expand Down

0 comments on commit 3543f86

Please sign in to comment.