From 0058ef27c5f87fb6306e89cf543c499f0ebb200e Mon Sep 17 00:00:00 2001 From: Scott Giese Date: Sun, 31 Jan 2021 21:58:41 -0600 Subject: [PATCH] TerraSync: Rate Limiter Sourceforge seems to have an agressive API rate limiter set at approximately 50 requests/minute. --- scripts/python/TerraSync/terrasync/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/python/TerraSync/terrasync/main.py b/scripts/python/TerraSync/terrasync/main.py index 0afd2b34d..bd9f71248 100755 --- a/scripts/python/TerraSync/terrasync/main.py +++ b/scripts/python/TerraSync/terrasync/main.py @@ -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)