mirror of
https://github.com/astaxie/beego.git
synced 2024-12-22 17:30:50 +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