Skip to content

Commit 634b5a5

Browse files
committed
fix sleep statement
1 parent f6e2b3d commit 634b5a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tap_github.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def authed_get(source, url, headers={}):
9696
remaining = resp.headers.get('X-RateLimit-Remaining')
9797
time_to_reset = resp.headers.get('X-RateLimit-Reset', time.time() + 60)
9898
if remaining is not None and remaining == 0:
99-
time.sleep(time.time() - time_to_reset)
99+
time.sleep(time_to_reset - time.time())
100100
continue # next attempt
101101

102102
# Handle github's possible failures as retries

0 commit comments

Comments
 (0)