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:
parent
053a075344
commit
2d6f1af1a5
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user