Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Throttle API requests to prevent rate limiting errors

  • Loading branch information...
commit 82ffaf7078a209bd1d20379505cbef9e522a5637 1 parent 5cf01cc
@DavidWittman DavidWittman authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  bin/clb
View
2  bin/clb
@@ -242,6 +242,8 @@ class CloudloadbalancersShell(object):
for ip in lb.virtualIps:
ips.append("%s/%s" % (ip.ipVersion, ip.address))
rows.append([lb.id, lb.name, lb.port, lb.protocol, lb.algorithm, len(lb.nodes), csv_list(ips)])
+ # Throttle requests if there are more than 5 LBs
+ if len(lbs) >= 5: time.sleep(.2)
print_list2(fields, rows, args.batch, args.delimiter)
def do_list_deleted(self, args):
Please sign in to comment.
Something went wrong with that request. Please try again.