Optimize library fetching mechanism

This commit is contained in:
Ben Adrian Sarmiento
2024-07-16 20:28:30 +02:00
parent 587c7ff037
commit f6b6ae113e
2 changed files with 48 additions and 77 deletions

View File

@@ -20,6 +20,9 @@ func (t *TorrentManager) refreshTorrents(initialRun bool) {
instances, _, err := t.rd.GetTorrents(false)
if err != nil {
t.log.Warnf("Cannot get torrents: %v", err)
t.log.Info("Retrying in 5 seconds")
time.Sleep(5 * time.Second)
t.refreshTorrents(initialRun)
return
}