lister: properly select credentials for each request
This commit is contained in:
parent
0254d72575
commit
736f6de936
1 changed files with 2 additions and 2 deletions
|
@ -137,11 +137,11 @@ def fetch(conf, mk_session, min_id=None, max_id=None):
|
|||
max_id = float('inf')
|
||||
next_id = min_id
|
||||
|
||||
cred = random.choice(conf['credentials'])
|
||||
|
||||
while min_id <= next_id <= max_id:
|
||||
logging.info('listing repos starting at %d' % next_id)
|
||||
since = next_id - 1 # github API ?since=... is '>' strict, not '>='
|
||||
|
||||
cred = random.choice(conf['credentials'])
|
||||
repos_res = gh_api_request('/repositories?since=%d' % since, **cred)
|
||||
|
||||
if 'cache_dir' in conf and conf['cache_json']:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue