@@ -555,7 +555,7 @@ def _format_submission(self, sub):
555
555
self ._log .debug ("Extracted job submission data: {0}" .format (formatted ))
556
556
return formatted
557
557
558
- def _get_final_output (self , download_dir , overwrite , callback = None , block = 1024 ):
558
+ def _get_final_output (self , download_dir , overwrite , callback = None , block = 4096 ):
559
559
"""Internal method to download jobs final output.
560
560
561
561
:Args:
@@ -566,10 +566,10 @@ def _get_final_output(self, download_dir, overwrite, callback=None, block=1024):
566
566
567
567
:Kwargs:
568
568
- callback (func): A function to be called to report download progress.
569
- The function takes three parameters : the percent downloaded (float), the
569
+ The function must take three arguments : the percent downloaded (float), the
570
570
bytes downloaded (float), and the total bytes to be downloaded (float).
571
571
- block (int): The amount of data downloaded in each block - determines
572
- the frequency with which the callback is called. Default is 1024 .
572
+ the frequency with which the callback is called. Default is 4096 .
573
573
574
574
:Returns:
575
575
- :class:`.Response` object returned directly from
@@ -599,7 +599,7 @@ def _get_final_output(self, download_dir, overwrite, callback=None, block=1024):
599
599
callback = callback ,
600
600
block = block )
601
601
602
- def _get_final_preview (self , download_dir , filename , overwrite , callback = None , block = 1024 ):
602
+ def _get_final_preview (self , download_dir , filename , overwrite , callback = None , block = 4096 ):
603
603
"""Internal method to download jobs final thumbnail.
604
604
We don't bother to check file size for download feedback, as it's
605
605
assumed to be very small.
@@ -613,10 +613,10 @@ def _get_final_preview(self, download_dir, filename, overwrite, callback=None, b
613
613
614
614
:Kwargs:
615
615
- callback (func): A function to be called to report download progress.
616
- The function takes three parameters : the percent downloaded (float), the
616
+ The function must take three arguments : the percent downloaded (float), the
617
617
bytes downloaded (float), and the total bytes to be downloaded (float).
618
618
- block (int): The amount of data downloaded in each block - determines
619
- the frequency with which the callback is called. Default is 1024 .
619
+ the frequency with which the callback is called. Default is 4096 .
620
620
621
621
:Returns:
622
622
- :class:`.Response` object returned directly from
@@ -630,7 +630,7 @@ def _get_final_preview(self, download_dir, filename, overwrite, callback=None, b
630
630
callback = callback ,
631
631
block = block )
632
632
633
- def _get_intermediate_output (self , output , download_dir , overwrite , callback = None , block = 1024 ):
633
+ def _get_intermediate_output (self , output , download_dir , overwrite , callback = None , block = 4096 ):
634
634
"""Internal method to download any file from the job output.
635
635
636
636
:Args:
@@ -643,10 +643,10 @@ def _get_intermediate_output(self, output, download_dir, overwrite, callback=Non
643
643
644
644
:Kwargs:
645
645
- callback (func): A function to be called to report download progress.
646
- The function takes three parameters : the percent downloaded (float), the
646
+ The function must take three arguments : the percent downloaded (float), the
647
647
bytes downloaded (float), and the total bytes to be downloaded (float).
648
648
- block (int): The amount of data downloaded in each block - determines
649
- the frequency with which the callback is called. Default is 1024 .
649
+ the frequency with which the callback is called. Default is 4096 .
650
650
651
651
652
652
:Returns:
@@ -705,7 +705,7 @@ def get_tasks(self):
705
705
else :
706
706
raise resp .result
707
707
708
- def get_output (self , download_dir , output = None , overwrite = False , callback = None , block = 1024 ):
708
+ def get_output (self , download_dir , output = None , overwrite = False , callback = None , block = 4096 ):
709
709
"""
710
710
Download a job output file.
711
711
This could be the jobs final output, or if specified, any intermediate
@@ -721,10 +721,10 @@ def get_output(self, download_dir, output=None, overwrite=False, callback=None,
721
721
will be downloaded, otherwise the job's final output will be
722
722
downloaded.
723
723
- callback (func): A function to be called to report download progress.
724
- The function takes three parameters : the percent downloaded (float), the
724
+ The function must take three arguments : the percent downloaded (float), the
725
725
bytes downloaded (float), and the total bytes to be downloaded (float).
726
726
- block (int): The amount of data downloaded in each block - determines
727
- the frequency with which the callback is called. Default is 1024 .
727
+ the frequency with which the callback is called. Default is 4096 .
728
728
729
729
:Returns:
730
730
- The full path to the downloaded file (str).
@@ -987,7 +987,7 @@ def __init__(self, client, job_id, **props):
987
987
'type' : _output .get ('kind' )
988
988
})
989
989
990
- def _get_file (self , output , download_dir , overwrite , callback = None , block = 1024 ):
990
+ def _get_file (self , output , download_dir , overwrite , callback = None , block = 4096 ):
991
991
"""Internal method to download a task output.
992
992
993
993
:Args:
@@ -1000,10 +1000,10 @@ def _get_file(self, output, download_dir, overwrite, callback=None, block=1024):
1000
1000
1001
1001
:Kwargs:
1002
1002
- callback (func): A function to be called to report download progress.
1003
- The function takes three parameters : the percent downloaded (float), the
1003
+ The function must take three arguments : the percent downloaded (float), the
1004
1004
bytes downloaded (float), and the total bytes to be downloaded (float).
1005
1005
- block (int): The amount of data downloaded in each block - determines
1006
- the frequency with which the callback is called. Default is 1024 .
1006
+ the frequency with which the callback is called. Default is 4096 .
1007
1007
1008
1008
:Returns:
1009
1009
- :class:`.Response` object returned directly from
@@ -1044,7 +1044,7 @@ def get_thumbnail(self, download_dir=None, filename=None, overwrite=True, callba
1044
1044
- overwrite (bool): Whether an existing file will be overwritten.
1045
1045
The default is ``True``.
1046
1046
- callback (func): A function to be called to report download progress.
1047
- The function takes three parameters : the percent downloaded (float), the
1047
+ The function must take three arguments : the percent downloaded (float), the
1048
1048
bytes downloaded (float), and the total bytes to be downloaded (float).
1049
1049
1050
1050
:Returns:
@@ -1109,7 +1109,7 @@ def list_outputs(self):
1109
1109
else :
1110
1110
raise resp .result
1111
1111
1112
- def get_output (self , output , download_dir , overwrite = False , callback = None , block = 1024 ):
1112
+ def get_output (self , output , download_dir , overwrite = False , callback = None , block = 4096 ):
1113
1113
"""Download a task output file.
1114
1114
1115
1115
:Args:
@@ -1122,10 +1122,10 @@ def get_output(self, output, download_dir, overwrite=False, callback=None, block
1122
1122
- overwrite (bool): Whether to overwrite an existing file.
1123
1123
The default is ``False``.
1124
1124
- callback (func): A function to be called to report download progress.
1125
- The function takes three parameters : the percent downloaded (float), the
1125
+ The function must take three arguments : the percent downloaded (float), the
1126
1126
bytes downloaded (float), and the total bytes to be downloaded (float).
1127
1127
- block (int): The amount of data downloaded in each block - determines
1128
- the frequency with which the callback is called. Default is 1024 .
1128
+ the frequency with which the callback is called. Default is 4096 .
1129
1129
1130
1130
:Returns:
1131
1131
- The full path to the downloaded file (str).
0 commit comments