Method: OFlow::Task#state_string

Defined in:
lib/oflow/task.rb

#state_stringString

Returns the state of the Task as a String.

Returns:

  • (String)

    String representation of the state



164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# File 'lib/oflow/task.rb', line 164

def state_string()
  ss = 'UNKNOWN'
  case @state
  when STARTING
    ss = 'STARTING'
  when STOPPED
    ss = 'STOPPED'
  when RUNNING
    ss = 'RUNNING'
  when CLOSING
    ss = 'CLOSING'
  when BLOCKED
    ss = 'BLOCKED'
  when STEP
    ss = 'STEP'
  end
  ss
end