Breaking Changes
Change in StartUpdate API API now retunrs a (*StartJobUpdateResult_, error) tuple instead of (*aurora.Response, error) Change in GetJobSummary API API now returns a []*aurora.JobUpdateSummary slice instead of (*aurora.Response, error)
This commit is contained in:
parent
d74833ac2b
commit
1c732146b1
7 changed files with 85 additions and 53 deletions
|
@ -96,17 +96,14 @@ func (m *Monitor) JobUpdateQuery(
|
|||
timer := time.NewTimer(timeout)
|
||||
defer timer.Stop()
|
||||
|
||||
var cliErr error
|
||||
var respDetail *aurora.Response
|
||||
for {
|
||||
select {
|
||||
case <-ticker.C:
|
||||
respDetail, cliErr = m.Client.GetJobUpdateSummaries(&updateQuery)
|
||||
updateSummaries, cliErr := m.Client.GetJobUpdateSummaries(&updateQuery)
|
||||
if cliErr != nil {
|
||||
return nil, cliErr
|
||||
}
|
||||
|
||||
updateSummaries := respDetail.Result_.GetJobUpdateSummariesResult_.UpdateSummaries
|
||||
if len(updateSummaries) >= 1 {
|
||||
return updateSummaries, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue