mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-29 17:42:12 +08:00
Fix for auto-detect metadata tool running second set metadata call.
This commit is contained in:
@@ -1495,6 +1495,12 @@ class JobWrapper( object ):
|
||||
just copy these files directly to the ulimate destination.
|
||||
"""
|
||||
return output_path
|
||||
|
||||
@property
|
||||
def requires_setting_metadata( self ):
|
||||
if self.tool:
|
||||
return self.tool.requires_setting_metadata
|
||||
return False
|
||||
|
||||
|
||||
class TaskWrapper(JobWrapper):
|
||||
|
||||
@@ -176,7 +176,7 @@ class BaseJobRunner( object ):
|
||||
|
||||
# Append metadata setting commands, we don't want to overwrite metadata
|
||||
# that was copied over in init_meta(), as per established behavior
|
||||
if include_metadata:
|
||||
if include_metadata and job_wrapper.requires_setting_metadata:
|
||||
commands += "; cd %s; " % os.path.abspath( os.getcwd() )
|
||||
commands += job_wrapper.setup_external_metadata(
|
||||
exec_dir = os.path.abspath( os.getcwd() ),
|
||||
|
||||
@@ -971,6 +971,7 @@ class Tool( object, Dictifiable ):
|
||||
"""
|
||||
|
||||
tool_type = 'default'
|
||||
requires_setting_metadata = True
|
||||
default_tool_action = DefaultToolAction
|
||||
dict_collection_visible_keys = ( 'id', 'name', 'version', 'description' )
|
||||
|
||||
@@ -3134,6 +3135,8 @@ class SetMetadataTool( Tool ):
|
||||
dataset.
|
||||
"""
|
||||
tool_type = 'set_metadata'
|
||||
requires_setting_metadata = False
|
||||
|
||||
def exec_after_process( self, app, inp_data, out_data, param_dict, job = None ):
|
||||
for name, dataset in inp_data.iteritems():
|
||||
external_metadata = JobExternalOutputMetadataWrapper( job )
|
||||
|
||||
Reference in New Issue
Block a user