Skip to content

Commit

Permalink
switch to WAIT method for operations
Browse files Browse the repository at this point in the history
  • Loading branch information
upodroid committed Dec 27, 2023
1 parent d7ef688 commit 45d767a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions upup/pkg/fi/cloudup/gce/op.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func waitForZoneOp(client *compute.Service, op *compute.Operation) error {
}

return waitForOp(op, func(operationName string) (*compute.Operation, error) {
return client.ZoneOperations.Get(u.Project, u.Zone, operationName).Do()
return client.ZoneOperations.Wait(u.Project, u.Zone, operationName).Do()
})
}

Expand All @@ -69,7 +69,7 @@ func waitForRegionOp(client *compute.Service, op *compute.Operation) error {
}

return waitForOp(op, func(operationName string) (*compute.Operation, error) {
return client.RegionOperations.Get(u.Project, u.Region, operationName).Do()
return client.RegionOperations.Wait(u.Project, u.Region, operationName).Do()
})
}

Expand All @@ -80,7 +80,7 @@ func waitForGlobalOp(client *compute.Service, op *compute.Operation) error {
}

return waitForOp(op, func(operationName string) (*compute.Operation, error) {
return client.GlobalOperations.Get(u.Project, operationName).Do()
return client.GlobalOperations.Wait(u.Project, operationName).Do()
})
}

Expand Down

0 comments on commit 45d767a

Please sign in to comment.