Skip to content

Commit

Permalink
简化写法
Browse files Browse the repository at this point in the history
  • Loading branch information
fengqi committed Aug 11, 2023
1 parent b00f475 commit 435375d
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions music_videos/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}

Expand Down

0 comments on commit 435375d

Please sign in to comment.