Skip to content

Commit

Permalink
sleep time in ihme download link checking
Browse files Browse the repository at this point in the history
  • Loading branch information
semio committed Jan 19, 2021
1 parent ca64e5f commit 7136c25
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ddf_utils/factory/ihme.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ def download_links(self, url):

while True:
res_json = session.get(url).json()

if 'urls' not in res_json:
sleep(30)
continue
dus = res_json['urls']
for du in dus:
if du in sent_urls:
Expand All @@ -89,7 +91,7 @@ def download_links(self, url):

if res_json['state'] in success_results:
break
sleep(10)
sleep(30)

def bulk_download(self, out_dir, version, context, **kwargs):
"""download the selected contexts/queries from GBD result tools.
Expand Down

0 comments on commit 7136c25

Please sign in to comment.