Use go functions instead of the worker pool
This commit is contained in:
@@ -107,7 +107,7 @@ func (t *TorrentManager) refreshTorrents(isInitialRun bool) []string {
|
||||
|
||||
// StartRefreshJob periodically refreshes the torrents
|
||||
func (t *TorrentManager) StartRefreshJob() {
|
||||
_ = t.workerPool.Submit(func() {
|
||||
go func() {
|
||||
t.log.Info("Starting periodic refresh job")
|
||||
refreshTicker := time.NewTicker(time.Duration(t.Config.GetRefreshEverySecs()) * time.Second)
|
||||
defer refreshTicker.Stop()
|
||||
@@ -131,7 +131,7 @@ func (t *TorrentManager) StartRefreshJob() {
|
||||
return
|
||||
}
|
||||
}
|
||||
})
|
||||
}()
|
||||
}
|
||||
|
||||
// getMoreInfo gets original name, size and files for a torrent
|
||||
|
||||
Reference in New Issue
Block a user