Skip to content

Commit

Permalink
address review
Browse files Browse the repository at this point in the history
  • Loading branch information
vigneshshanmugam committed Oct 13, 2023
1 parent 052f880 commit 1244160
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions heartbeat/monitors/wrappers/summarizer/plugstatestat.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ func (ssp *commonSSP) BeforeSummary(event *beat.Event) BeforeSummaryActions {
lastStatus := ssp.stateTracker.GetCurrentStatus(ssp.sf)

curCheckDown := ssp.js.Status == monitorstate.StatusDown
lastStateUpOrEmpty := ssp.stateTracker.GetCurrentStatus(ssp.sf) == monitorstate.StatusUp ||
ssp.stateTracker.GetCurrentStatus(ssp.sf) == monitorstate.StatusEmpty
lastStateUpOrEmpty := lastStatus == monitorstate.StatusUp || lastStatus == monitorstate.StatusEmpty
hasAttemptsRemaining := ssp.js.Attempt < ssp.js.MaxAttempts

// retry if...
Expand All @@ -175,7 +174,7 @@ func (ssp *commonSSP) BeforeSummary(event *beat.Event) BeforeSummaryActions {

eventext.MergeEventFields(event, fields)

logp.L().Debugf("attempt info: current(%v) == lastStatus(%v) && attempts(%d < %d)", ssp.js.Status, lastStatus, ssp.js.Attempt, ssp.js.MaxAttempts)
logp.L().Infof("attempt info: current(%v) == lastStatus(%v) && attempts(%d < %d)", ssp.js.Status, lastStatus, ssp.js.Attempt, ssp.js.MaxAttempts)

if retry {
return RetryBeforeSummary
Expand Down

0 comments on commit 1244160

Please sign in to comment.