diff options
Diffstat (limited to 'client/go/internal/cli/cmd/waiter.go')
-rw-r--r-- | client/go/internal/cli/cmd/waiter.go | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/client/go/internal/cli/cmd/waiter.go b/client/go/internal/cli/cmd/waiter.go index 302bc679885..0cfb3aa76d5 100644 --- a/client/go/internal/cli/cmd/waiter.go +++ b/client/go/internal/cli/cmd/waiter.go @@ -11,17 +11,12 @@ import ( // Waiter waits for Vespa services to become ready, within a timeout. type Waiter struct { - // Once species whether we should wait at least one time, irregardless of timeout. - Once bool - // Timeout specifies how long we should wait for an operation to complete. Timeout time.Duration // TODO(mpolden): Consider making this a budget cli *CLI } -func (w *Waiter) wait() bool { return w.Once || w.Timeout > 0 } - // DeployService returns the service providing the deploy API on given target, func (w *Waiter) DeployService(target vespa.Target) (*vespa.Service, error) { s, err := target.DeployService() @@ -74,8 +69,6 @@ func (w *Waiter) Services(target vespa.Target) ([]*vespa.Service, error) { func (w *Waiter) maybeWaitFor(service *vespa.Service) error { if w.Timeout > 0 { w.cli.printInfo("Waiting up to ", color.CyanString(w.Timeout.String()), " for ", service.Description(), "...") - } - if w.wait() { return service.Wait(w.Timeout) } return nil |