mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 15:20:54 +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
|
// AddTask add task with name
|
||||||
func AddTask(taskname string, t Tasker) {
|
func AddTask(taskname string, t Tasker) {
|
||||||
|
t.SetNext(time.Now().Local())
|
||||||
AdminTaskList[taskname] = t
|
AdminTaskList[taskname] = t
|
||||||
if isstart {
|
if isstart {
|
||||||
changed <- true
|
changed <- true
|
||||||
|
Loading…
Reference in New Issue
Block a user