mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Rework delaying/cancelling workflow evalation with non-data inputs
We try to fail early if any (expression.json) dataset in a dataset collection is not OK. Probably cheaper then delaying execution many times.
This commit is contained in:
@@ -368,17 +368,22 @@ class WorkflowProgress(object):
|
||||
delayed_why = "dependent collection [%s] not yet populated with datasets" % replacement.id
|
||||
raise modules.DelayedWorkflowEvaluation(why=delayed_why)
|
||||
|
||||
if not is_data:
|
||||
data_inputs = (model.HistoryDatasetAssociation, model.HistoryDatasetCollectionAssociation, model.DatasetCollection)
|
||||
if not is_data and isinstance(replacement, data_inputs):
|
||||
if isinstance(replacement, model.HistoryDatasetAssociation):
|
||||
if replacement.is_ok:
|
||||
return replacement
|
||||
elif replacement.is_pending:
|
||||
raise modules.DelayedWorkflowEvaluation()
|
||||
elif isinstance(replacement, (model.HistoryDatasetCollectionAssociation, model.DatasetCollection)):
|
||||
if any((_.is_pending for _ in replacement.dataset_instances)):
|
||||
if replacement.is_pending:
|
||||
raise modules.DelayedWorkflowEvaluation()
|
||||
if not replacement.is_ok:
|
||||
raise modules.CancelWorkflowEvaluation()
|
||||
else:
|
||||
raise modules.CancelWorkflowEvaluation()
|
||||
pending = False
|
||||
for dataset_instance in replacement.dataset_instances:
|
||||
if dataset_instance.is_pending:
|
||||
pending = True
|
||||
elif not dataset_instance.is_ok:
|
||||
raise modules.CancelWorkflowEvaluation()
|
||||
if pending:
|
||||
raise modules.DelayedWorkflowEvaluation()
|
||||
|
||||
return replacement
|
||||
|
||||
|
||||
Reference in New Issue
Block a user