code: func (r *realisClient) RestartJob(key *aurora.JobKey) (*aurora.Response, error) {
  
  	instanceIds, err1 := r.GetInstanceIds(key, aurora.ACTIVE_STATES)
  	if err1 != nil {
  		return nil, errors.Wrap(err1, "Could not retrieve relevant task instance IDs")
  	}
  
  	r.logger.DebugPrintf("RestartShards Thrift Payload: %+v %v\n", key, instanceIds)
  
  	if len(instanceIds) > 0 {
  		resp, retryErr := r.thriftCallWithRetries(func() (*aurora.Response, error) {
  			return r.client.RestartShards(nil, key, instanceIds)
  		})
  
  		if retryErr != nil {
  			return nil, errors.Wrap(retryErr, "Error sending Restart command to Aurora Scheduler")
  		}
  
  		return resp, nil
  	} else {
  		return nil, errors.New("No tasks in the Active state")
  	}
  }
docs: // Restarts all active tasks under a job configuration.