You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Too many requests per second result in an unhandled exception. The limit of API calls per second is unknown.
To Reproduce
Steps to reproduce the behavior:
Query for DNS records of 10+ domains quickly and you will receive an exception for too many requests. It seems to be a 1 minute window but I'm not sure.
Expected behavior
Exception handling with exponential back-off retry of the API call. Alternatively, simple throttling to remain under the API RPS limit is acceptable.
Screenshots
N/A
Debugging information (please complete the following information):
GoDaddyPy Version 2.5.1
Additional context
Not having this as a built in feature requires adding ugly wrappers to the library such as this:
class GoDaddyClient:
wait_time = timedelta(milliseconds=1000) #1 second
def init(self, client):
self.client = client
self.last_call_time = datetime.now()
def _wait_until(self):
time_since_last_call = datetime.now() - self.last_call_time
if time_since_last_call < self.wait_time:
time_to_wait = self.wait_time - time_since_last_call
logger.debug(f"Waiting for {time_to_wait} seconds to avoid GoDaddy API limit")
sleep(time_to_wait.total_seconds())
self.last_call_time = datetime.now()
def get_records(self, domain):
self._wait_until()
return self.client.get_records(domain)
The text was updated successfully, but these errors were encountered:
Describe the bug
Too many requests per second result in an unhandled exception. The limit of API calls per second is unknown.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Exception handling with exponential back-off retry of the API call. Alternatively, simple throttling to remain under the API RPS limit is acceptable.
Screenshots
N/A
Debugging information (please complete the following information):
Additional context
Not having this as a built in feature requires adding ugly wrappers to the library such as this:
class GoDaddyClient:
wait_time = timedelta(milliseconds=1000) #1 second
def init(self, client):
self.client = client
self.last_call_time = datetime.now()
The text was updated successfully, but these errors were encountered: