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

dynamically add task

This commit is contained in:
Yumin Wu 2018-11-12 17:17:06 +08:00
parent 053a075344
commit 2d6f1af1a5

View File

@ -446,6 +446,7 @@ func StopTask() {
// AddTask add task with name
func AddTask(taskname string, t Tasker) {
t.SetNext(time.Now().Local())
AdminTaskList[taskname] = t
if isstart {
changed <- true