Skip to content

Commit

Permalink
add warnings instead of errors
Browse files Browse the repository at this point in the history
  • Loading branch information
vintikzzz committed Dec 18, 2021
1 parent 433aafe commit df8e150
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions services/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ func (s *Store) touch(h string) (val interface{}, err error) {
log.WithField("infohash", h).WithField("duration", time.Since(t)).WithField("provider", v.Name()).Info("provider not touched")
continue
} else if err != nil {
return nil, err
log.WithField("infohash", h).WithField("duration", time.Since(t)).WithField("provider", v.Name()).WithError(err).Warn("provider has error")
continue
}
log.WithField("infohash", h).WithField("duration", time.Since(t)).WithField("provider", v.Name()).Info("provider touch")
if i > 0 {
Expand All @@ -101,7 +102,8 @@ func (s *Store) pull(h string, start int) (torrent []byte, err error) {
log.WithField("infohash", h).WithField("provider", s.providers[j].Name()).Info("provider push")
err = s.providers[j].Push(h, torrent)
if err != nil {
return nil, err
log.WithField("infohash", h).WithField("duration", time.Since(t)).WithField("provider", s.providers[j].Name()).WithError(err).Warn("provider not pushed")
continue
}
}
}
Expand Down

0 comments on commit df8e150

Please sign in to comment.