Task query optional parameters (#69)

* Change TaskQuery struct parameters to optional

* Thrift API is modified to make all the parameters in the
  TaskQuery struct optional

* Autogenerated code is regenerated

* Changes in TaskQuery structs used in the project

* Now that TaskQuery receive optional values, pointers
  instead of values must be passed to the struct
This commit is contained in:
Ezequiel Torres Feyuk 2018-06-28 15:48:28 -03:00 committed by Renan DelValle
parent 6c8ab10b64
commit fe567ee966
5 changed files with 253 additions and 162 deletions

View file

@ -497,9 +497,9 @@ func (r *realisClient) Close() {
// Uses predefined set of states to retrieve a set of active jobs in Apache Aurora.
func (r *realisClient) GetInstanceIds(key *aurora.JobKey, states map[aurora.ScheduleStatus]bool) (map[int32]bool, error) {
taskQ := &aurora.TaskQuery{
Role: key.Role,
Environment: key.Environment,
JobName: key.Name,
Role: &key.Role,
Environment: &key.Environment,
JobName: &key.Name,
Statuses: states,
}
@ -880,9 +880,9 @@ func (r *realisClient) FetchTaskConfig(instKey aurora.InstanceKey) (*aurora.Task
ids[instKey.InstanceId] = true
taskQ := &aurora.TaskQuery{
Role: instKey.JobKey.Role,
Environment: instKey.JobKey.Environment,
JobName: instKey.JobKey.Name,
Role: &instKey.JobKey.Role,
Environment: &instKey.JobKey.Environment,
JobName: &instKey.JobKey.Name,
InstanceIds: ids,
Statuses: aurora.ACTIVE_STATES,
}