Log updates

This commit is contained in:
Ben Sarmiento
2024-05-27 15:54:28 +02:00
parent 4ec1c4496d
commit f28255a142
3 changed files with 17 additions and 22 deletions

View File

@@ -75,6 +75,8 @@ func (t *TorrentManager) refreshTorrents() []string {
wg.Wait()
close(mergeChan)
t.log.Infof("Compiling %d torrents", len(instances))
for torrent := range mergeChan {
if torrent == nil {
continue
@@ -105,8 +107,6 @@ func (t *TorrentManager) refreshTorrents() []string {
})
}
noInfoCount := 0
// removed torrents
oldPlusNewKeys := mapset.NewSet[string](allTorrents.Keys()...)
oldPlusNewKeys.Difference(freshAccessKeys).Each(func(accessKey string) bool {
@@ -114,7 +114,7 @@ func (t *TorrentManager) refreshTorrents() []string {
return false
})
t.log.Infof("Compiled into %d torrents, %d were missing info", allTorrents.Count(), noInfoCount)
t.log.Infof("Compiled into %d unique torrents", allTorrents.Count())
// delete info files that are no longer present
t.getInfoFiles().Each(func(path string) bool {