better logging
This commit is contained in:
parent
bab70ee743
commit
86767b2e39
@ -424,7 +424,7 @@ def main():
|
||||
download_stream = download.stream(amt=1024 * 1024)
|
||||
try:
|
||||
while chunk := next(download_stream, b""):
|
||||
logger.debug("Read chunk of %d bytes", len(chunk))
|
||||
# logger.debug("Read chunk of %d bytes", len(chunk))
|
||||
offset += len(chunk)
|
||||
retries = 10
|
||||
yield chunk
|
||||
@ -432,7 +432,10 @@ def main():
|
||||
break
|
||||
except IncompleteRead as e:
|
||||
logger.warn(
|
||||
"IncompleteRead, retries=%d", retries, exc_info=True
|
||||
"IncompleteRead, retries=%d, offset=%d",
|
||||
retries,
|
||||
offset,
|
||||
exc_info=True,
|
||||
)
|
||||
if retries <= 0:
|
||||
logger.error("Max retries exceeded")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user