Ran go fmt on project. Changed FechTaskConfig to only fetch configurations in an existing state

This commit is contained in:
Renan DelValle 2016-08-24 17:21:59 -07:00
parent d810808b68
commit bb3b26340d
3 changed files with 9 additions and 9 deletions

View file

@ -238,17 +238,17 @@ func (r realisClient) FetchTaskConfig(instKey aurora.InstanceKey) (*aurora.TaskC
taskQ := &aurora.TaskQuery{Role: instKey.JobKey.Role,
Environment: instKey.JobKey.Environment,
JobName: instKey.JobKey.Name,
InstanceIds: ids, }
InstanceIds: ids,
Statuses: aurora.ACTIVE_STATES}
response, err := r.client.GetTasksStatus(taskQ)
if err != nil {
return nil, errors.Wrap(err, "Error querying Aurora Scheduler for task configuration")
}
tasks := response.GetResult_().GetScheduleStatusResult_().GetTasks()
if(len(tasks) == 0) {
if len(tasks) == 0 {
return nil, errors.Errorf("Instance %d for jobkey %s/%s/%s doesn't exist",
instKey.InstanceId,
instKey.JobKey.Environment,