Skip to content

Commit

Permalink
avoid logging if context is done (#10553)
Browse files Browse the repository at this point in the history
Co-authored-by: amirylm <[email protected]>
  • Loading branch information
RyanRHall and amirylm authored Sep 7, 2023
1 parent 247918e commit a8c921b
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ func (p *logEventProvider) Start(context.Context) error {
lggr.Warnw("readQ is full, dropping ids", "ids", ids)
}
})
// if the context was canceled, we don't need to log the error
if ctx.Err() != nil {
return
}
if err != nil {
lggr.Warnw("stopped scheduling read jobs with error", "err", err)
}
Expand Down

0 comments on commit a8c921b

Please sign in to comment.