Skip to content

Commit 7136c25

Browse files
committed
sleep time in ihme download link checking
1 parent ca64e5f commit 7136c25

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ddf_utils/factory/ihme.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ def download_links(self, url):
7777

7878
while True:
7979
res_json = session.get(url).json()
80-
80+
if 'urls' not in res_json:
81+
sleep(30)
82+
continue
8183
dus = res_json['urls']
8284
for du in dus:
8385
if du in sent_urls:
@@ -89,7 +91,7 @@ def download_links(self, url):
8991

9092
if res_json['state'] in success_results:
9193
break
92-
sleep(10)
94+
sleep(30)
9395

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

0 commit comments

Comments
 (0)