diff --git a/music_videos/collector.go b/music_videos/collector.go index 8f70789..386f51a 100644 --- a/music_videos/collector.go +++ b/music_videos/collector.go @@ -189,13 +189,9 @@ func (c *Collector) runScanner() { task() ticker := time.NewTicker(time.Second * time.Duration(c.config.Collector.CronSeconds)) - for { - select { - case <-ticker.C: - task() - - utils.Logger.Debug("run music video scanner finished") - } + for range ticker.C { + task() + utils.Logger.Debug("run music video scanner finished") } }