Skip to content

Commit 2c3188f

Browse files
varmar05wonder-sk
authored andcommitted
increased timeout limits
1 parent 7ac175f commit 2c3188f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

mergin/client.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ def download_project(self, project_path, directory, parallel=True):
396396
for future in concurrent.futures.as_completed(futures_map):
397397
file = futures_map[future]
398398
try:
399-
future.result(60)
399+
future.result(600)
400400
except concurrent.futures.TimeoutError:
401401
raise ClientError("Timeout error: failed to download {}".format(file))
402402
else:
@@ -454,7 +454,7 @@ def push_project(self, directory, parallel=True):
454454
for future in concurrent.futures.as_completed(futures_map):
455455
file = futures_map[future]
456456
try:
457-
future.result(60)
457+
future.result(600)
458458
except concurrent.futures.TimeoutError:
459459
raise ClientError("Timeout error: failed to upload {}".format(file))
460460
else:
@@ -521,13 +521,13 @@ def backup_if_conflict(path, checksum):
521521
with concurrent.futures.ThreadPoolExecutor() as executor:
522522
futures_map = {}
523523
for file in fetch_files:
524-
future = executor.submit(project_path, server_info['version'], file, temp_dir, parallel)
524+
future = executor.submit(self._download_file, project_path, server_info['version'], file, temp_dir, parallel)
525525
futures_map[future] = file
526526

527527
for future in concurrent.futures.as_completed(futures_map):
528528
file = futures_map[future]
529529
try:
530-
future.result(60)
530+
future.result(600)
531531
except concurrent.futures.TimeoutError:
532532
raise ClientError("Timeout error: failed to download {}".format(file))
533533
src = os.path.join(temp_dir, file["path"])
@@ -596,7 +596,7 @@ def download_file_part(part):
596596
for future in concurrent.futures.as_completed(futures_map):
597597
i = futures_map[future]
598598
try:
599-
future.result(60)
599+
future.result(300)
600600
except concurrent.futures.TimeoutError:
601601
raise ClientError('Timeout error: failed to download part {} of file {}'.format(i, basename))
602602
else:
@@ -658,7 +658,7 @@ def upload_chunk(chunk_id, data):
658658
for future in concurrent.futures.as_completed(futures_map):
659659
chunk = futures_map[future]
660660
try:
661-
future.result(60)
661+
future.result(300)
662662
except concurrent.futures.TimeoutError:
663663
raise ClientError('Timeout error: failed to upload chunk {}'.format(chunk))
664664
else:

0 commit comments

Comments
 (0)