mirror of
https://github.com/astaxie/beego.git
synced 2024-12-25 20:30:50 +00:00
complete check
This commit is contained in:
parent
b838683731
commit
c435d231ab
@ -548,13 +548,20 @@ func(m *taskManager) DeleteTask(taskname string) {
|
||||
|
||||
// ClearTask clear all tasks
|
||||
func(m *taskManager) ClearTask() {
|
||||
isChanged := false
|
||||
|
||||
m.taskLock.Lock()
|
||||
m.adminTaskList = make(map[string]Tasker)
|
||||
if m.started {
|
||||
isChanged = true
|
||||
}
|
||||
m.taskLock.Unlock()
|
||||
|
||||
go func() {
|
||||
m.changed <- true
|
||||
}()
|
||||
if isChanged {
|
||||
go func() {
|
||||
m.changed <- true
|
||||
}()
|
||||
}
|
||||
}
|
||||
|
||||
// MapSorter sort map for tasker
|
||||
|
Loading…
Reference in New Issue
Block a user