Adding TerminalUpdateStates function which returns a slice containing all terminal states for an update. Changed signature of JobUpdateStatus from using a map for desired states to a slice. A map is no longer necessary with the new version of thrift and only adds complexity.

This commit is contained in:
Renan DelValle 2019-09-12 16:57:07 -07:00
parent 2cc19ce7da
commit a698e3b8dd
No known key found for this signature in database
GPG key ID: C240AD6D6F443EC9
4 changed files with 25 additions and 24 deletions

View file

@ -830,7 +830,7 @@ func (r *realisClient) AbortJobUpdate(updateKey aurora.JobUpdateKey, message str
m := Monitor{Client: r}
_, err := m.JobUpdateStatus(
updateKey,
map[aurora.JobUpdateStatus]bool{aurora.JobUpdateStatus_ABORTED: true},
[]aurora.JobUpdateStatus{aurora.JobUpdateStatus_ABORTED},
time.Second*5,
time.Minute)
@ -1063,7 +1063,6 @@ func (r *realisClient) RollbackJobUpdate(key aurora.JobUpdateKey, message string
// VariableBatchStep returns the current batch the update is in during a variable batch update.
func (r *realisClient) VariableBatchStep(key aurora.JobUpdateKey) (int, error) {
// Query Aurora for an Update that is either paused or rolling forward
resp, err := r.JobUpdateDetails(aurora.JobUpdateQuery{
UpdateStatuses: []aurora.JobUpdateStatus{