From 8ac43ca3a0ea5495961aeaaac9dce8bd147c1aa1 Mon Sep 17 00:00:00 2001 From: Tomasz Maczukin <tomasz@maczukin.pl> Date: Tue, 30 Mar 2021 19:08:34 +0200 Subject: [PATCH] Use Wait() not Get() to check operation status --- drivers/google/compute_util.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/google/compute_util.go b/drivers/google/compute_util.go index 07de0e21..be3b4da3 100644 --- a/drivers/google/compute_util.go +++ b/drivers/google/compute_util.go @@ -618,14 +618,14 @@ func (c *ComputeUtil) waitForOp(opGetter func() (*raw.Operation, error)) error { // waitForRegionalOp waits for the regional operation to finish. func (c *ComputeUtil) waitForRegionalOp(name string) error { return c.waitForOp(func() (*raw.Operation, error) { - return c.service.ZoneOperations.Get(c.project, c.zone, name).Do() + return c.service.ZoneOperations.Wait(c.project, c.zone, name).Do() }) } // waitForGlobalOp waits for the global operation to finish. func (c *ComputeUtil) waitForGlobalOp(name string) error { return c.waitForOp(func() (*raw.Operation, error) { - return c.service.GlobalOperations.Get(c.project, name).Do() + return c.service.GlobalOperations.Wait(c.project, name).Do() }) } -- GitLab