@@ -65,7 +65,7 @@ def __init__(self, stored_output=None, is_async=False, pipeline_segment_instance
6565 def run_query (self , tool_name , tool_version , input_prefix_mapping ,
6666 output_type , tool_args = None , database_name = None , database_version = None ,
6767 custom_database_path = None , output_name = "output" , output_primary_name = None ,
68- input_files = None , output_path = None , thread_statuses = None ):
68+ input_files = None , output_path = None , skip_decompression = False , thread_statuses = None ):
6969 """Executes a query to the Toolchest API.
7070
7171 :param tool_name: Tool to be used.
@@ -80,6 +80,7 @@ def run_query(self, tool_name, tool_version, input_prefix_mapping,
8080 :param input_files: List of paths to be passed in as input.
8181 :param output_path: Path (client-side) where the output file will be downloaded.
8282 :param output_type: Type (e.g. GZ_TAR) of the output file
83+ :param skip_decompression: Whether to skip decompression of the output file, if it is an archive
8384 :param thread_statuses: Statuses of all threads, shared between threads.
8485 """
8586 self .thread_name = threading .current_thread ().getName ()
@@ -129,7 +130,7 @@ def run_query(self, tool_name, tool_version, input_prefix_mapping,
129130
130131 self ._wait_for_job ()
131132
132- self ._download (output_path , output_type )
133+ self ._download (output_path , output_type , skip_decompression )
133134
134135 self .mark_as_failed = False
135136 self ._update_status (Status .COMPLETE )
@@ -361,7 +362,7 @@ def _wait_for_job(self):
361362 leftover_delay = elapsed_time % self .WAIT_FOR_JOB_DELAY
362363 time .sleep (leftover_delay )
363364
364- def _download (self , output_path , output_type ):
365+ def _download (self , output_path , output_type , skip_decompression ):
365366 """Retrieves information needed for downloading. If ``output_path`` is given,
366367 downloads output to ``output_path`` and decompresses output archive, if necessary.
367368 """
@@ -375,6 +376,7 @@ def _download(self, output_path, output_type):
375376 output_path = output_path ,
376377 output_file_keys = output_file_keys ,
377378 output_type = output_type ,
379+ skip_decompression = skip_decompression ,
378380 )
379381 self ._update_status (Status .TRANSFERRED_TO_CLIENT )
380382 except ToolchestDownloadError as err :
0 commit comments