We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This manifests as HTTPError exceptions -- 429 client errors, e.g.:
$ ravshello -aDQ >>> from __future__ import print_function >>> from requests import HTTPError >>> def getapps(c=1): ... n = 0 ... now = datetime.now().strftime('%H:%M:%S') ... print("[{}] Start time".format(now)) ... for i in range(c): ... n += 1 ... try: ... apps = r.get_applications() ... except HTTPError as e: ... now = datetime.now().strftime('%H:%M:%S') ... print("[{}] Failed getApplications call #{}".format(now, n)) ... print(e[0]) ... return ... else: ... print("#{} ({} apps returned)".format(n, len(apps))) ... now = datetime.now().strftime('%H:%M:%S') ... print("[{}] End time".format(now)) ... print("Successfully called getApplications {} times".format(n)) ... >>> getapps(15) [17:54:19] Start time #1 (57 apps returned) #2 (57 apps returned) #3 (57 apps returned) #4 (57 apps returned) #5 (57 apps returned) #6 (57 apps returned) #7 (57 apps returned) #8 (57 apps returned) #9 (57 apps returned) #10 (57 apps returned) [17:54:21] Failed getApplications call #11 429 Client Error: Too Many Requests for url: https://cloud.ravellosystems.com/api/v1/applications >>> sleep(40); getapps(15) [17:55:10] Start time #1 (57 apps returned) #2 (57 apps returned) #3 (57 apps returned) #4 (57 apps returned) #5 (57 apps returned) #6 (57 apps returned) #7 (57 apps returned) #8 (57 apps returned) #9 (57 apps returned) #10 (57 apps returned) [17:55:11] Failed getApplications call #11 429 Client Error: Too Many Requests for url: https://cloud.ravellosystems.com/api/v1/applications
(On this account we have a 10/min limit on using getApplications.)
getApplications
The text was updated successfully, but these errors were encountered:
catch http status 429 (likely rate-limiting) and retry
40db8aa
For now, gonna handle this in the sdk, e.g.:
ryran/python-sdk@88568ed
Sorry, something went wrong.
ryran
No branches or pull requests
This manifests as HTTPError exceptions -- 429 client errors, e.g.:
(On this account we have a 10/min limit on using
getApplications
.)The text was updated successfully, but these errors were encountered: