From d30239a1e6580416f13ecadfbe707d01090481cf Mon Sep 17 00:00:00 2001 From: Djordje Lukic Date: Tue, 5 May 2020 16:51:41 +0200 Subject: [PATCH] Change the default polling delays So that the backend knows that the container(s) are running faster --- azure/aci.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/azure/aci.go b/azure/aci.go index 99d5e3486..258598d4d 100644 --- a/azure/aci.go +++ b/azure/aci.go @@ -8,18 +8,18 @@ import ( "net/http" "os" "strings" + "time" "github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance" "github.com/Azure/azure-sdk-for-go/services/keyvault/auth" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/to" + tm "github.com/buger/goterm" "github.com/gobwas/ws" "github.com/gobwas/ws/wsutil" "github.com/pkg/errors" "github.com/docker/api/context/store" - - tm "github.com/buger/goterm" ) func init() { @@ -56,7 +56,6 @@ func createACIContainers(ctx context.Context, aciContext store.AciContext, group *groupDefinition.Name, groupDefinition, ) - if err != nil { return err } @@ -247,6 +246,9 @@ func getContainerGroupsClient(subscriptionID string) (containerinstance.Containe } containerGroupsClient := containerinstance.NewContainerGroupsClient(subscriptionID) containerGroupsClient.Authorizer = auth + containerGroupsClient.PollingDelay = 5 * time.Second + containerGroupsClient.RetryAttempts = 30 + containerGroupsClient.RetryDuration = 1 * time.Second return containerGroupsClient, nil }