mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Skip discovered outputs
This prevents overwriting discovered metadata with default values, and is more efficient than doing this twice.
This commit is contained in:
@@ -547,6 +547,7 @@ def collect_primary_datasets(job_context: Union[JobContext, SessionlessJobContex
|
||||
outdata.init_meta()
|
||||
outdata.set_meta()
|
||||
outdata.set_peek()
|
||||
outdata.discovered = True
|
||||
sa_session = job_context.sa_session
|
||||
if sa_session:
|
||||
sa_session.add(outdata)
|
||||
|
||||
@@ -1852,6 +1852,9 @@ class JobWrapper(HasResourceParameters):
|
||||
job.job_messages = [str(e)]
|
||||
|
||||
for dataset_assoc in output_dataset_associations:
|
||||
if getattr(dataset_assoc.dataset, "discovered", False):
|
||||
# skip outputs that have been discovered
|
||||
continue
|
||||
context = self.get_dataset_finish_context(job_context, dataset_assoc)
|
||||
# should this also be checking library associations? - can a library item be added from a history before the job has ended? -
|
||||
# lets not allow this to occur
|
||||
|
||||
@@ -815,6 +815,7 @@ def persist_hdas(elements, model_persistence_context, final_job_state="ok"):
|
||||
final_job_state=state,
|
||||
storage_callbacks=storage_callbacks,
|
||||
)
|
||||
dataset.discovered = True
|
||||
if not hda_id:
|
||||
datasets.append(dataset)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user