1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-22 17:40:48 +00:00

Beego 运行过程中动态增减定时任务时,now的时间需要更新,否则等待时间会不正确

beego 启动时,执行toolbox.StartTask()
运行过程中,动态添加定时任务(这个是now时间已经不是starttask的时间了,需要刷新)     
     case <-changed:
			now = time.Now().Local()
			continue
This commit is contained in:
PaulChen2016 2017-04-19 16:22:58 +08:00 committed by GitHub
parent 323a1c4214
commit 0cb8de4218

View File

@ -427,6 +427,7 @@ func run() {
}
continue
case <-changed:
now = time.Now().Local()
continue
case <-stop:
return