From df8e150714fd5b9420e92612b37111e40ac0eb47 Mon Sep 17 00:00:00 2001 From: Pavel Tatarskiy Date: Sat, 18 Dec 2021 18:21:09 +0300 Subject: [PATCH] add warnings instead of errors --- services/store.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/services/store.go b/services/store.go index 76418f1..287fa3a 100644 --- a/services/store.go +++ b/services/store.go @@ -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 { @@ -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 } } }