func (task *Task) getEarliestKnownTaskStatusForContainers() apitaskstatus.TaskStatus {
	if len(task.Containers) == 0 {
		seelog.Criticalf("No containers in the task: %s", task.String())
		return apitaskstatus.TaskStatusNone
	}
	// Set earliest container status to an impossible to reach 'high' task status
	earliest := apitaskstatus.TaskZombie
	for _, container := range task.Containers {
		containerTaskStatus := apitaskstatus.MapContainerToTaskStatus(container.GetKnownStatus(), container.GetSteadyStateStatus())
		if containerTaskStatus < earliest {
			earliest = containerTaskStatus
		}
	}

	return earliest
}
func (task *Task) getEarliestKnownTaskStatusForContainers() apitaskstatus.TaskStatus {
	if len(task.Containers) == 0 {
		seelog.Criticalf("No containers in the task: %s", task.String())
		return apitaskstatus.TaskStatusNone
	}
	
	earliest := apitaskstatus.TaskZombie
	for _, container := range task.Containers {
		containerTaskStatus := apitaskstatus.MapContainerToTaskStatus(container.GetKnownStatus(), container.GetSteadyStateStatus())
		if containerTaskStatus < earliest {
			earliest = containerTaskStatus
		}
	}

	return earliest
}
func ( task * Task ) getEarliestKnownTaskStatusForContainers ( ) apitaskstatus . TaskStatus { if len ( task . Containers ) == 0 { seelog . Criticalf ( " " , task . String ( ) ) return apitaskstatus . TaskStatusNone } // Set earliest container status to an impossible to reach 'high' task status earliest := apitaskstatus . TaskZombie for _ , container := range task . Containers { containerTaskStatus := apitaskstatus . MapContainerToTaskStatus ( container . GetKnownStatus ( ) , container . GetSteadyStateStatus ( ) ) if containerTaskStatus < earliest { earliest = containerTaskStatus } } return earliest }
// getEarliestKnownTaskStatusForContainers gets the lowest (earliest) task status
// based on the known statuses of all containers in the task
getEarliestKnownTaskStatusForContainers gets the lowest ( earliest ) task status based on the known statuses of all containers in the task