Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Commit

Permalink
Removed result zero checking
Browse files Browse the repository at this point in the history
  • Loading branch information
ebarakos committed Mar 30, 2021
1 parent 2e4de0f commit 91f813e
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions services/fluxmonitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,16 +215,7 @@ func (fm *FluxMonitor) checkAndSendJob(initiate bool) error {
return err
}

if fm.latestResult.IsZero() {
logger.Warn("Polling because result is zero")
err := fm.poll()
if err != nil {
logger.Error("cannot retrieve result from polling")
return err
}
}

// If latestResult is an old value for some reason, try to fetch new
// If latestResult is an old value or have not being set yet, try to fetch new
if time.Since(fm.latestResultTimestamp) > fm.config.PollInterval+fm.config.AdapterTimeout {
logger.Warn("Polling again because result is old")
err := fm.poll()
Expand Down

0 comments on commit 91f813e

Please sign in to comment.