Skip to content

Commit

Permalink
Update Comments of time sleep after API call
Browse files Browse the repository at this point in the history
  • Loading branch information
innodreamer committed Jan 23, 2024
1 parent f31bc7c commit ca15664
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit ca15664

Please sign in to comment.