code: func RestartCondition(task *api.Task) api.RestartPolicy_RestartCondition {
  	restartCondition := defaults.Service.Task.Restart.Condition
  	if task.Spec.Restart != nil {
  		restartCondition = task.Spec.Restart.Condition
  	}
  	return restartCondition
  }
docs: // RestartCondition returns the restart condition to apply to this task.