yangwwei commented on a change in pull request #155: URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/155#discussion_r455589477
########## File path: pkg/cache/application.go ########## @@ -232,6 +232,24 @@ func (app *Application) getTasks(state string) []*Task { return taskList } +func (app *Application) getNonTerminatedTaskAlias() []string { + var nonTerminatedTaskAlias []string Review comment: looks like this can be simplified like the following: ``` var nonTerminatedTaskAlias []string for _, task := range app.taskMap { for _, states := range events.States().Task.Terminated { if states == task.GetTaskState() { continue } } nonTerminatedTaskAlias = append(nonTerminatedTaskAlias, task.alias) } return nonTerminatedTaskAlias ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org