🎨 启动后台任务时延迟 50-200 毫秒

This commit is contained in:
Liang Ding 2023-01-27 16:23:00 +08:00
parent d0e15500df
commit 90c5d5b6b7
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -45,6 +45,7 @@ func StartCron() {
}
func every(interval time.Duration, f func()) {
util.RandomSleep(50, 200)
for {
func() {
defer logging.Recover()