mirror of
https://github.com/astaxie/beego.git
synced 2024-11-24 13:00:56 +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()
|
||||
|
||||
if isChanged {
|
||||
go func() {
|
||||
m.changed <- true
|
||||
}()
|
||||
}
|
||||
}
|
||||
|
||||
// MapSorter sort map for tasker
|
||||
|
Loading…
Reference in New Issue
Block a user