Fix 2.4.2 upgrade notes formatting refs #19330
[arvados.git] / apps / workbench / app / models / work_unit.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 class WorkUnit
6   # This is an abstract class that documents the WorkUnit interface
7
8   def label
9     # returns the label that was assigned when creating the work unit
10   end
11
12   def uuid
13     # returns the arvados UUID of the underlying object
14   end
15
16   def parent
17     # returns the parent uuid of this work unit
18   end
19
20   def children
21     # returns an array of child work units
22   end
23
24   def modified_by_user_uuid
25     # returns uuid of the user who modified this work unit most recently
26   end
27
28   def owner_uuid
29     # returns uuid of the owner of this work unit
30   end
31
32   def created_at
33     # returns created_at timestamp
34   end
35
36   def modified_at
37     # returns modified_at timestamp
38   end
39
40   def started_at
41     # returns started_at timestamp for this work unit
42   end
43
44   def finished_at
45     # returns finished_at timestamp
46   end
47
48   def state_label
49     # returns a string representing state of the work unit
50   end
51
52   def exit_code
53     # returns the work unit's execution exit code
54   end
55
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
58   end
59
60   def success?
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.
64   end
65
66   def progress
67     # returns a number between 0 and 1
68   end
69
70   def log_collection
71     # returns uuid or pdh with saved log data, if any
72   end
73
74   def parameters
75     # returns work unit parameters, if any
76   end
77
78   def script
79     # returns script for this work unit, if any
80   end
81
82   def repository
83     # returns this work unit's script repository, if any
84   end
85
86   def script_version
87     # returns this work unit's script_version, if any
88   end
89
90   def supplied_script_version
91     # returns this work unit's supplied_script_version, if any
92   end
93
94   def docker_image
95     # returns this work unit's docker_image, if any
96   end
97
98   def runtime_constraints
99     # returns this work unit's runtime_constraints, if any
100   end
101
102   def priority
103     # returns this work unit's priority, if any
104   end
105
106   def nondeterministic
107     # returns if this is nondeterministic
108   end
109
110   def outputs
111     # returns array containing uuid or pdh of output data
112   end
113
114   def child_summary
115     # summary status of any children of this work unit
116   end
117
118   def child_summary_str
119     # textual representation of child summary
120   end
121
122   def can_cancel?
123     # returns true if this work unit can be canceled
124   end
125
126   def confirm_cancellation
127     # returns true if this work unit wants to use a confirmation for cancellation
128   end
129
130   def uri
131     # returns the uri for this work unit
132   end
133
134   def title
135     # title for the work unit
136   end
137
138   def has_unreadable_children
139     # accept it if you can't understand your own children
140   end
141
142   # view helper methods
143   def walltime
144     # return walltime for a running or completed work unit
145   end
146
147   def cputime
148     # return cputime for a running or completed work unit
149   end
150
151   def queuedtime
152     # return queued time if the work unit is queued
153   end
154
155   def is_running?
156     # is the work unit in running state?
157   end
158
159   def is_paused?
160     # is the work unit in paused state?
161   end
162
163   def is_finished?
164     # is the work unit in finished state?
165   end
166
167   def is_failed?
168     # is this work unit in failed state?
169   end
170
171   def command
172     # command to execute
173   end
174
175   def cwd
176     # initial workind directory
177   end
178
179   def environment
180     # environment variables
181   end
182
183   def mounts
184     # mounts
185   end
186
187   def output_path
188     # path to a directory or file to save output
189   end
190
191   def container_uuid
192     # container_uuid of a container_request
193   end
194
195   def requesting_container_uuid
196     # requesting_container_uuid of a container_request
197   end
198
199   def log_object_uuids
200     # object uuids for live log
201   end
202
203   def live_log_lines(limit)
204     # fetch log entries from logs table for @proxied
205   end
206
207   def render_log
208     # return partial and locals to be rendered
209   end
210
211   def template_uuid
212     # return the uuid of this work unit's template, if one exists
213   end
214
215   def runtime_status
216     # Returns this work unit's runtime_status, if any
217   end
218 end