code: func (r *realisClient) GetInstanceIds(key *aurora.JobKey, states []aurora.ScheduleStatus) ([]int32, error) {
  	taskQ := &aurora.TaskQuery{
  		Role:        &key.Role,
  		Environment: &key.Environment,
  		JobName:     &key.Name,
  		Statuses:    states,
  	}
  
  	r.logger.DebugPrintf("GetTasksWithoutConfigs Thrift Payload: %+v\n", taskQ)
  
  	resp, retryErr := r.thriftCallWithRetries(func() (*aurora.Response, error) {
  		return r.client.GetTasksWithoutConfigs(nil, taskQ)
  	})
  
  	// If we encountered an error we couldn't recover from by retrying, return an error to the user
  	if retryErr != nil {
  		return nil, errors.Wrap(retryErr, "Error querying Aurora Scheduler for active IDs")
  	}
  
  	// Construct instance id map to stay in line with thrift's representation of sets
  	tasks := response.ScheduleStatusResult(resp).GetTasks()
  	jobInstanceIds := make([]int32, 0, len(tasks))
  	for _, task := range tasks {
  		jobInstanceIds = append(jobInstanceIds, task.GetAssignedTask().GetInstanceId())
  	}
  	return jobInstanceIds, nil
  
  }
docs: // Uses predefined set of states to retrieve a set of active jobs in Apache Aurora.