1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
6 # This is an abstract class that documents the WorkUnit interface
9 # returns the label that was assigned when creating the work unit
13 # returns the arvados UUID of the underlying object
17 # returns the parent uuid of this work unit
21 # returns an array of child work units
24 def modified_by_user_uuid
25 # returns uuid of the user who modified this work unit most recently
29 # returns uuid of the owner of this work unit
33 # returns created_at timestamp
37 # returns modified_at timestamp
41 # returns started_at timestamp for this work unit
45 # returns finished_at timestamp
49 # returns a string representing state of the work unit
53 # returns the work unit's execution exit code
56 def state_bootstrap_class
57 # returns a class like "danger", "success", or "warning" that a view can use directly to make a display class
61 # returns true if the work unit finished successfully,
62 # false if it has a permanent failure,
63 # and nil if the final state is not determined.
67 # returns a number between 0 and 1
71 # returns uuid or pdh with saved log data, if any
75 # returns work unit parameters, if any
79 # returns script for this work unit, if any
83 # returns this work unit's script repository, if any
87 # returns this work unit's script_version, if any
90 def supplied_script_version
91 # returns this work unit's supplied_script_version, if any
95 # returns this work unit's docker_image, if any
98 def runtime_constraints
99 # returns this work unit's runtime_constraints, if any
103 # returns this work unit's priority, if any
107 # returns if this is nondeterministic
111 # returns array containing uuid or pdh of output data
115 # summary status of any children of this work unit
118 def child_summary_str
119 # textual representation of child summary
123 # returns true if this work unit can be canceled
126 def confirm_cancellation
127 # returns true if this work unit wants to use a confirmation for cancellation
131 # returns the uri for this work unit
135 # title for the work unit
138 def has_unreadable_children
139 # accept it if you can't understand your own children
142 # view helper methods
144 # return walltime for a running or completed work unit
148 # return cputime for a running or completed work unit
152 # return queued time if the work unit is queued
156 # is the work unit in running state?
160 # is the work unit in paused state?
164 # is the work unit in finished state?
168 # is this work unit in failed state?
176 # initial workind directory
180 # environment variables
188 # path to a directory or file to save output
192 # container_uuid of a container_request
195 def requesting_container_uuid
196 # requesting_container_uuid of a container_request
200 # object uuids for live log
203 def live_log_lines(limit)
204 # fetch log entries from logs table for @proxied
208 # return partial and locals to be rendered
212 # return the uuid of this work unit's template, if one exists
216 # Returns this work unit's runtime_status, if any