This is an automated email from the ASF dual-hosted git repository.
brondsem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git
The following commit(s) were added to refs/heads/master by this push:
new 383d153 Wait a bit longer than needed, to avoid retrying right when
the limit is up (since it might still fail then)
383d153 is described below
commit 383d153c6469f1c97661b2e37d5f7d83ed808029
Author: Dave Brondsema <[email protected]>
AuthorDate: Thu Apr 22 14:13:35 2021 -0400
Wait a bit longer than needed, to avoid retrying right when the limit is up
(since it might still fail then)
---
ForgeImporters/forgeimporters/github/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ForgeImporters/forgeimporters/github/__init__.py
b/ForgeImporters/forgeimporters/github/__init__.py
index 24b0b78..0983725 100644
--- a/ForgeImporters/forgeimporters/github/__init__.py
+++ b/ForgeImporters/forgeimporters/github/__init__.py
@@ -89,7 +89,7 @@ class GitHubProjectExtractor(base.ProjectExtractor):
now = datetime.utcnow()
log.warn('Rate limit exceeded (%s requests/hour). '
'Sleeping until %s UTC' % (limit, reset))
- time.sleep((reset - now).total_seconds())
+ time.sleep((reset - now).total_seconds() + 2)
def urlopen(self, url, headers=None, **kw):
if headers is None: