Skip to content

Commit

Permalink
Decrease log level for torrent search timeout for non-slow sites
Browse files Browse the repository at this point in the history
  • Loading branch information
doingodswork committed Nov 18, 2020
1 parent 9abdf96 commit 70826e8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/imdb2torrent/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ func (c *Client) FindMagnets(ctx context.Context, imdbID string) ([]Result, erro
case err := <-siteErrChan:
errChan <- err
case <-timer.C:
c.logger.Warn("Finding torrents timed out. It will continue to run in the background.", zapFieldID, zapFieldTorrentSite)
if siteClient.IsSlow() {
c.logger.Info("Finding torrents timed out. It will continue to run in the background.", zapFieldID, zapFieldTorrentSite)
} else {
c.logger.Warn("Finding torrents timed out. It will continue to run in the background.", zapFieldID, zapFieldTorrentSite)
}
resChan <- nil
}
}(siteName, siteClient, timer)
Expand Down

0 comments on commit 70826e8

Please sign in to comment.