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