Skip to content

Commit 89b1f87

Browse files
committed
update timeout & chunk
1 parent f76c8c0 commit 89b1f87

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

oclp_r/support/network_handler.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def validate_link(self) -> bool:
223223
bool: True if link is valid, False otherwise
224224
"""
225225
try:
226-
response = SESSION.head(self.url, timeout=5, allow_redirects=True)
226+
response = SESSION.head(self.url, timeout=500, allow_redirects=True)
227227
if response.status_code == 404:
228228
return False
229229
else:
@@ -345,7 +345,8 @@ def __init__(self, url: str, path: str, size: str = None, resume_download: bool
345345
self.downloaded_file_offset: float = 0.0
346346
self.start_time: float = time.time()
347347
self.multipart_threshold: float = 1024 * 1024 * 50
348-
self.chunk_count: int = 16
348+
self.chunk_count: int = 64
349+
349350
self.part_buffers: list[io.BytesIO] = []
350351
self.part_errors_queue: queue.Queue = queue.Queue()
351352
self.part_progress: dict[int, dict] = {}

0 commit comments

Comments
 (0)