code simplify

Signed-off-by: hao.cheng <hao.cheng@daocloud.io>
This commit is contained in:
hao.cheng 2019-10-24 16:27:23 +08:00
parent 3810dcef0f
commit 758e7aa06f

View File

@ -351,8 +351,5 @@ func UpdateTaskStatus(id int64, status string, statusRevision int64, statusCondi
}
func taskFinished(status string) bool {
if status == models.TaskStatusFailed || status == models.TaskStatusStopped || status == models.TaskStatusSucceed {
return true
}
return false
return status == models.TaskStatusFailed || status == models.TaskStatusStopped || status == models.TaskStatusSucceed
}