mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Delay tool exec for discovered & mapped-over input
We should only finalize collections up until the map over depth, as indicated by the TODO that is now obsolete. Fixes https://github.com/galaxyproject/galaxy/issues/5867 and probably a bunch of other issues where workflows don't run to completion.
This commit is contained in:
@@ -3445,14 +3445,13 @@ class DatasetCollection(Dictifiable, UsesAnnotations, RepresentById):
|
||||
self.populated_state = DatasetCollection.populated_states.FAILED
|
||||
self.populated_state_message = message
|
||||
|
||||
def finalize(self):
|
||||
def finalize(self, collection_type_description):
|
||||
# All jobs have written out their elements - everything should be populated
|
||||
# but might not be - check that second case! (TODO)
|
||||
self.mark_as_populated()
|
||||
if self.has_subcollections:
|
||||
# THIS IS WRONG - SHOULD ONLY BE TO THE DEPTH OF THE MAP OVER.
|
||||
if self.has_subcollections and collection_type_description.has_subcollections():
|
||||
for element in self.elements:
|
||||
element.child_collection.finalize()
|
||||
element.child_collection.finalize(collection_type_description.child_collection_type_description())
|
||||
|
||||
@property
|
||||
def dataset_instances(self):
|
||||
|
||||
@@ -314,7 +314,9 @@ class ExecutionTracker(object):
|
||||
implicit_collection_jobs = implicit_collection.implicit_collection_jobs
|
||||
implicit_collection_jobs.populated_state = "ok"
|
||||
trans.sa_session.add(implicit_collection_jobs)
|
||||
implicit_collection.collection.finalize()
|
||||
implicit_collection.collection.finalize(
|
||||
collection_type_description=self.collection_info.structure.collection_type_description
|
||||
)
|
||||
trans.sa_session.add(implicit_collection.collection)
|
||||
trans.sa_session.flush()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user