Fix for auto-detect metadata tool running second set metadata call.

This commit is contained in:
Daniel Blankenberg
2013-10-07 16:27:08 -04:00
parent 570134a838
commit 0ddc8d3a3d
3 changed files with 10 additions and 1 deletions
+6
View File
@@ -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):
+1 -1
View File
@@ -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() ),
+3
View File
@@ -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 )