Skip to content

Commit 81372e6

Browse files
committed
sra_metadata: Increase logging around retries.
1 parent 6d6688b commit 81372e6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kingfisher/sra_metadata.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ def retrying(i, num_retries=3):
4343

4444
for i in range(num_retries):
4545
try:
46+
logging.debug("Attempting to {} (attempt {} of {})".format(description, i+1, num_retries))
4647
this_res = func()
4748
if not this_res.ok:
4849
logging.warning("Request not OK when {}: {}: {}".format(description, this_res, this_res.text))
@@ -55,6 +56,7 @@ def retrying(i, num_retries=3):
5556
logging.warning("Exception raised when {}: {}".format(description, e))
5657
logging.warning("Sleeping for {} seconds before retrying".format(sleep_time))
5758
time.sleep(60)
59+
logging.debug("Finished sleeping, potentially retrying")
5860
retrying(i)
5961
raise Exception("Failed to {} after {} attempts".format(description, num_retries))
6062

0 commit comments

Comments
 (0)