Merge branch '9353-retry-http-error' closes #9353
[arvados.git] / apps / workbench / app / models / work_unit.rb
1 class WorkUnit
2   # This is an abstract class that documents the WorkUnit interface
3
4   def label
5     # returns the label that was assigned when creating the work unit
6   end
7
8   def uuid
9     # returns the arvados UUID of the underlying object
10   end
11
12   def children
13     # returns an array of child work units
14   end
15
16   def modified_by_user_uuid
17     # returns uuid of the user who modified this work unit most recently
18   end
19
20   def created_at
21     # returns created_at timestamp
22   end
23
24   def modified_at
25     # returns modified_at timestamp
26   end
27
28   def started_at
29     # returns started_at timestamp for this work unit
30   end
31
32   def finished_at
33     # returns finished_at timestamp
34   end
35
36   def state_label
37     # returns a string representing state of the work unit
38   end
39
40   def state_bootstrap_class
41     # returns a class like "danger", "success", or "warning" that a view can use directly to make a display class
42   end
43
44   def success?
45     # returns true if the work unit finished successfully,
46     # false if it has a permanent failure,
47     # and nil if the final state is not determined.
48   end
49
50   def progress
51     # returns a number between 0 and 1
52   end
53
54   def log_collection
55     # returns uuid or pdh with saved log data, if any
56   end
57
58   def parameters
59     # returns work unit parameters, if any
60   end
61
62   def script
63     # returns script for this work unit, if any
64   end
65
66   def repository
67     # returns this work unit's script repository, if any
68   end
69
70   def script_version
71     # returns this work unit's script_version, if any
72   end
73
74   def supplied_script_version
75     # returns this work unit's supplied_script_version, if any
76   end
77
78   def docker_image
79     # returns this work unit's docker_image, if any
80   end
81
82   def runtime_constraints
83     # returns this work unit's runtime_constraints, if any
84   end
85
86   def priority
87     # returns this work unit's priority, if any
88   end
89
90   def nondeterministic
91     # returns if this is nondeterministic
92   end
93
94   def outputs
95     # returns array containing uuid or pdh of output data
96   end
97
98   def child_summary
99     # summary status of any children of this work unit
100   end
101
102   def child_summary_str
103     # textual representation of child summary
104   end
105
106   def can_cancel?
107     # returns true if this work unit can be canceled
108   end
109
110   def readable?
111     # is the proxied object readable by current user?
112   end
113
114   def uri
115     # returns the uri for this work unit
116   end
117
118   def title
119     # title for the work unit
120   end
121
122   def has_unreadable_children
123     # accept it if you can't understand your own children
124   end
125
126   # view helper methods
127   def link_to_log
128     # display a link to log if present
129   end
130
131   def walltime
132     # return walltime for a running or completed work unit
133   end
134
135   def cputime
136     # return cputime for a running or completed work unit
137   end
138
139   def queuedtime
140     # return queued time if the work unit is queued
141   end
142
143   def is_running?
144     # is the work unit in running state?
145   end
146
147   def is_paused?
148     # is the work unit in paused state?
149   end
150
151   def is_finished?
152     # is the work unit in finished state?
153   end
154
155   def is_failed?
156     # is this work unit in failed state?
157   end
158
159   def command
160     # command to execute
161   end
162
163   def cwd
164     # initial workind directory
165   end
166
167   def environment
168     # environment variables
169   end
170
171   def mounts
172     # mounts
173   end
174
175   def output_path
176     # path to a directory or file to save output
177   end
178
179   def container_uuid
180     # container_uuid of a container_request
181   end
182 end