mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 02:20:54 +00:00
Merge pull request #3387 from wuyumin/master
dynamically add task #2708
This commit is contained in:
commit
55f390d08a
@ -449,6 +449,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