[REV] optimize task delete strategy

This commit is contained in:
bay1ts 2017-12-22 17:09:57 +08:00
parent 0efd81284e
commit 492ae3d53f

View File

@ -120,7 +120,7 @@ func (t Task) CanBeDelete() bool {
return true
}
for _, v := range t.Status {
if v.Status == "exec" {
if v.Status != "create" {
return false
}
}
@ -205,7 +205,7 @@ func (t TaskGroup) CanBeDelete() bool {
return true
}
for _, v := range t.Status.TaskStatus {
if v.Status == "exec" {
if v.Status != "create" {
return false
}
}