diff --git a/internal/app/api/service/bilbil_picture.go b/internal/app/api/service/bilbil_picture.go index 529e28a..0454a7f 100644 --- a/internal/app/api/service/bilbil_picture.go +++ b/internal/app/api/service/bilbil_picture.go @@ -54,13 +54,16 @@ func (c *RandomPicsCache) Run() error { c.flush() }() go func(_tk *time.Ticker) { - for { - select { - case <-_tk.C: - c.flush() - default: - continue - } +// for { +// select { +// case <-_tk.C: +// c.flush() +// default: +// continue +// } +// } + for _ = range _tk.C { + c.flush() } }(tk) return nil