Compare commits

...

3 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
751b0d6e82 Release version 0.35.0 2020-08-05 12:02:21 -04:00
Jose Diaz-Gonzalez
ea633ca2bb Merge pull request #156 from samanthaq/restore-optional-throttling
Make API request throttling optional
2020-08-05 12:01:56 -04:00
Samantha Baldwin
a2115ce3e5 Make API request throttling optional 2020-08-05 11:53:17 -04:00
3 changed files with 8 additions and 3 deletions

View File

@@ -1,9 +1,14 @@
Changelog
=========
0.34.0 (2020-07-24)
0.35.0 (2020-08-05)
-------------------
------------------------
- Make API request throttling optional. [Samantha Baldwin]
0.34.0 (2020-07-24)
-------------------
- Add logic for transforming gist repository urls to ssh. [Matt Fields]

View File

@@ -1 +1 @@
__version__ = '0.34.0'
__version__ = '0.35.0'

View File

@@ -457,7 +457,7 @@ def retrieve_data_gen(args, template, query_args=None, single_request=False):
status_code = int(r.getcode())
# be gentle with API request limit and throttle requests if remaining requests getting low
limit_remaining = int(r.headers.get('x-ratelimit-remaining', 0))
if limit_remaining <= args.throttle_limit:
if args.throttle_limit and limit_remaining <= args.throttle_limit:
log_info(
'API request limit hit: {} requests left, pausing further requests for {}s'.format(
limit_remaining,