From 5a8f03e979e23f152dfa58dc0ac2363b34261b96 Mon Sep 17 00:00:00 2001 From: Andrei Rybnov Date: Tue, 12 Dec 2023 17:49:40 +0400 Subject: [PATCH] Add timeout --- cmd/deploy_script/main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/deploy_script/main.go b/cmd/deploy_script/main.go index 1701159..bb24553 100644 --- a/cmd/deploy_script/main.go +++ b/cmd/deploy_script/main.go @@ -2,12 +2,14 @@ package main import ( "fmt" + "os" + "time" + "github.com/deweb-services/deployment-script/internal/dws" "github.com/deweb-services/deployment-script/internal/types" "github.com/deweb-services/deployment-script/pkg/logger" "github.com/spf13/cobra" "github.com/spf13/viper" - "os" ) var ( @@ -52,6 +54,7 @@ var ( if err != nil { return fmt.Errorf("create gpu error: %w", err) } + time.Sleep(time.Second * 60) respGet, err := cli.GetGPU(cmd.Context(), respCreate.UUID) if err != nil { return fmt.Errorf("get gpu error: %w", err)