Skip to content

Commit

Permalink
Notifier: fix poller loop
Browse files Browse the repository at this point in the history
The return was in incorrect place and cause that only first updater was
processed. Rest of updaters were skipped.

Signed-off-by: Ales Raszka <[email protected]>
  • Loading branch information
Allda authored and ldelossa committed Oct 19, 2020
1 parent 15b607a commit 673bd0f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions notifier/poller.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,18 @@ func (p *Poller) onTick(ctx context.Context, c chan<- Event) {
select {
case c <- e:
default:
log.Warn().Str("updater", e.updater).Str("UOID", e.uo.Ref.String()).Msg("could not deliver event to channel. backing off till next tick")
log.Warn().
Str("updater", updater).
Str("UOID", latest.Ref.String()).
Msg("could not deliver event to channel. skipping updater now")
}
return
continue
}
if err != nil {
log.Error().Err(err).Msg("received error getting receipt by UOID. backing off till next tick")
log.Error().Err(err).
Str("updater", updater).
Str("UOID", latest.Ref.String()).
Msg("received error getting receipt by UOID. backing off till next tick")
return
}
}
Expand Down

0 comments on commit 673bd0f

Please sign in to comment.