1
0
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:
astaxie 2018-11-13 14:51:41 +08:00 committed by GitHub
commit 55f390d08a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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