From ca15664348d87b5ab54450f6c75a60c16f97e747 Mon Sep 17 00:00:00 2001 From: Sean Oh Date: Tue, 23 Jan 2024 21:03:54 +0900 Subject: [PATCH] Update Comments of time sleep after API call --- .../drivers/ktcloud/resources/NLBHandler.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cloud-control-manager/cloud-driver/drivers/ktcloud/resources/NLBHandler.go b/cloud-control-manager/cloud-driver/drivers/ktcloud/resources/NLBHandler.go index bd73d7852..34abe19d4 100644 --- a/cloud-control-manager/cloud-driver/drivers/ktcloud/resources/NLBHandler.go +++ b/cloud-control-manager/cloud-driver/drivers/ktcloud/resources/NLBHandler.go @@ -120,7 +120,7 @@ func (nlbHandler *KtCloudNLBHandler) ListNLB() ([]*irs.NLBInfo, error) { LoggingInfo(callLogInfo, start) // spew.Dump(result) - time.Sleep(time.Second * 1) // Before the next if ... + time.Sleep(time.Second * 1) // Before 'return' // To Prevent the Error : "Unable to execute API command listTags due to ratelimit timeout" if len(nlbResp.Listnlbsresponse.NLB) < 1 { @@ -387,7 +387,7 @@ func (nlbHandler *KtCloudNLBHandler) RemoveVMs(nlbIID irs.IID, vmIIDs *[]irs.IID // spew.Dump(removeResp) // cblogger.Info("\n") - time.Sleep(time.Second * 1) // Before the next if ... + time.Sleep(time.Second * 1) // Before 'return' // To Prevent the Error : "Unable to execute API command listTags due to ratelimit timeout" if !removeResp.Removenlbvmresponse.Success { @@ -423,7 +423,7 @@ func (nlbHandler *KtCloudNLBHandler) GetVMGroupHealthInfo(nlbIID irs.IID) (irs.H return irs.HealthInfo{}, newErr } - time.Sleep(time.Second * 1) // Before the next if ... + time.Sleep(time.Second * 1) // Before 'return' // To Prevent the Error : "Unable to execute API command listTags due to ratelimit timeout" if len(nlbResp.Listnlbvmsresponse.NLBVM) < 1 { @@ -558,7 +558,7 @@ func (nlbHandler *KtCloudNLBHandler) GetVMGroupInfo(nlbId string) (irs.VMGroupIn LoggingInfo(callLogInfo, start) // spew.Dump(nlbResp) - time.Sleep(time.Second * 1) // Before the next if ... + time.Sleep(time.Second * 1) // Before 'return' // To Prevent the Error : "Unable to execute API command listTags due to ratelimit timeout" if len(nlbResp.Listnlbvmsresponse.NLBVM) < 1 { @@ -630,7 +630,7 @@ func (nlbHandler *KtCloudNLBHandler) GetServiceIdWithVMId(nlbId string, vmId str return 0, newErr } - time.Sleep(time.Second * 1) // Before the next if ... + time.Sleep(time.Second * 1) // Before 'return' // To Prevent the Error : "Unable to execute API command listTags due to ratelimit timeout" if len(nlbResp.Listnlbvmsresponse.NLBVM) < 1 { @@ -740,7 +740,7 @@ func (nlbHandler *KtCloudNLBHandler) GetKTCloudNLB(nlbId string) (*ktsdk.NLB, er // cblogger.Info("\n# nlbResp : ") // spew.Dump(nlbResp) - time.Sleep(time.Second * 1) // Before the next if ... + time.Sleep(time.Second * 1) // Before 'return' // To Prevent the Error : "Unable to execute API command listTags due to ratelimit timeout" if len(nlbResp.Listnlbsresponse.NLB) < 1 {