projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
20259: Add documentation for banner and tooltip features
[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 62bbc5431937e6a4b89826a3f03e2cda5c37ff27..d481f41c7eab37b0f8ba0192ba9e17438fd3803e 100644
(file)
--- a/
apps/workbench/app/models/pipeline_instance.rb
+++ b/
apps/workbench/app/models/pipeline_instance.rb
@@
-1,3
+1,7
@@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
require "arvados/keep"
class PipelineInstance < ArvadosBase
require "arvados/keep"
class PipelineInstance < ArvadosBase
@@
-103,9
+107,10
@@
class PipelineInstance < ArvadosBase
def stderr_log_query(limit=nil)
query = Log.
def stderr_log_query(limit=nil)
query = Log.
- where(event_type: "stderr",
- object_uuid: stderr_log_object_uuids).
- order("id DESC")
+ with_count('none').
+ where(event_type: "stderr",
+ object_uuid: stderr_log_object_uuids).
+ order("created_at DESC")
unless limit.nil?
query = query.limit(limit)
end
unless limit.nil?
query = query.limit(limit)
end
@@
-122,10
+127,10
@@
class PipelineInstance < ArvadosBase
Keep::Locator.parse(loc_s)
end
if log_pdhs.any? and
Keep::Locator.parse(loc_s)
end
if log_pdhs.any? and
- Collection.where(portable_data_hash: log_pdhs).limit(1).results.any?
+ Collection.where(portable_data_hash: log_pdhs).limit(1).
with_count("none").
results.any?
true
elsif log_uuids.any? and
true
elsif log_uuids.any? and
- Collection.where(uuid: log_uuids).limit(1).results.any?
+ Collection.where(uuid: log_uuids).limit(1).
with_count("none").
results.any?
true
else
stderr_log_query(1).results.any?
true
else
stderr_log_query(1).results.any?
@@
-133,7
+138,11
@@
class PipelineInstance < ArvadosBase
end
def work_unit(label=nil)
end
def work_unit(label=nil)
- PipelineInstanceWorkUnit.new(self, label || self.name)
+ PipelineInstanceWorkUnit.new(self, label || self.name, self.uuid)
+ end
+
+ def cancel
+ arvados_api_client.api "pipeline_instances/#{self.uuid}/", "cancel", {"cascade" => true}
end
private
end
private