Skip to content

Commit a2115ce

Browse files
committed
Make API request throttling optional
1 parent 8a00bb1 commit a2115ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

github_backup/github_backup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ def retrieve_data_gen(args, template, query_args=None, single_request=False):
457457
status_code = int(r.getcode())
458458
# be gentle with API request limit and throttle requests if remaining requests getting low
459459
limit_remaining = int(r.headers.get('x-ratelimit-remaining', 0))
460-
if limit_remaining <= args.throttle_limit:
460+
if args.throttle_limit and limit_remaining <= args.throttle_limit:
461461
log_info(
462462
'API request limit hit: {} requests left, pausing further requests for {}s'.format(
463463
limit_remaining,

0 commit comments

Comments
 (0)