Skip to content

Commit

Permalink
Revert selective metadata flushing - seems to break upload changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Oct 11, 2018
1 parent 9251484 commit df07b28
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/galaxy/model/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ def make_copy(self, value, target_context, source_context):
if value:
new_value = galaxy.model.MetadataFile(dataset=target_context.parent, name=self.spec.name)
object_session(target_context.parent).add(new_value)
object_session(target_context.parent).flush([new_value])
object_session(target_context.parent).flush()
shutil.copy(value.file_name, new_value.file_name)
return self.unwrap(new_value)
return None
Expand Down Expand Up @@ -573,7 +573,7 @@ def new_file(self, dataset=None, **kwds):
if object_session(dataset):
mf = galaxy.model.MetadataFile(name=self.spec.name, dataset=dataset, **kwds)
object_session(dataset).add(mf)
object_session(dataset).flush([dataset, mf]) # flush to assign id
object_session(dataset).flush() # flush to assign id
return mf
else:
# we need to make a tmp file that is accessable to the head node,
Expand Down Expand Up @@ -776,7 +776,7 @@ def __get_filename_override():
json.dump(override_metadata, open(metadata_files.filename_override_metadata, 'wt+'))
# add to session and flush
sa_session.add(metadata_files)
sa_session.flush([metadata_files])
sa_session.flush()
metadata_files_list.append(metadata_files)
args = '"%s" "%s" %s %s' % (metadata_path_on_compute(datatypes_config),
job_metadata,
Expand Down

0 comments on commit df07b28

Please sign in to comment.