projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '9277-trash-container-outputs' closes #9277
[arvados.git]
/
apps
/
workbench
/
app
/
models
/
pipeline_instance.rb
diff --git
a/apps/workbench/app/models/pipeline_instance.rb
b/apps/workbench/app/models/pipeline_instance.rb
index 6e556d5b75cae13626aad29d1c0a816a5a78b583..b6e0ef17aef886e624f5a9398827091a9d189863 100644
(file)
--- a/
apps/workbench/app/models/pipeline_instance.rb
+++ b/
apps/workbench/app/models/pipeline_instance.rb
@@
-13,7
+13,7
@@
class PipelineInstance < ArvadosBase
template = if lookup and lookup[self.pipeline_template_uuid]
lookup[self.pipeline_template_uuid]
else
template = if lookup and lookup[self.pipeline_template_uuid]
lookup[self.pipeline_template_uuid]
else
- PipelineTemplate.
where(uuid: self.pipeline_template_uuid).first
+ PipelineTemplate.
find?(self.pipeline_template_uuid) if self.pipeline_template_uuid
end
if template
template.name
end
if template
template.name
@@
-132,6
+132,14
@@
class PipelineInstance < ArvadosBase
end
end
end
end
+ def work_unit(label=nil)
+ PipelineInstanceWorkUnit.new(self, label || self.name, self.uuid)
+ end
+
+ def cancel
+ arvados_api_client.api "pipeline_instances/#{self.uuid}/", "cancel", {"cascade" => true}
+ end
+
private
def components_map
private
def components_map