mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 20:00:55 +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
|
// 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