1
0
Fork 0

TerraSync: Rate Limiter

Sourceforge seems to have an agressive API rate limiter set at approximately 50 requests/minute.
This commit is contained in:
Scott Giese 2021-01-31 21:58:41 -06:00
parent 7621569834
commit 0058ef27c5

View file

@ -165,6 +165,8 @@ class HTTPGetter:
return urljoin(baseUrl + '/', httpGetCallback.src.asRelative())
def doGet(self, httpGetCallback):
time.sleep(1.25) # throttle the rate
pathOnServer = self.assemblePath(httpGetCallback)
self.httpConnection.request("GET", pathOnServer, None,
self.httpRequestHeaders)