Module: Conductor::Http::Models::WorkflowStatusConstants
- Defined in:
- lib/conductor/http/models/workflow_status_constants.rb
Overview
WorkflowStatus constants and helper methods
Constant Summary collapse
- RUNNING =
Status values
'RUNNING'- COMPLETED =
'COMPLETED'- FAILED =
'FAILED'- TIMED_OUT =
'TIMED_OUT'- TERMINATED =
'TERMINATED'- PAUSED =
'PAUSED'- ALL =
[RUNNING, COMPLETED, FAILED, TIMED_OUT, TERMINATED, PAUSED].freeze
- TERMINAL_STATUSES =
Terminal statuses - workflow has ended
[COMPLETED, FAILED, TIMED_OUT, TERMINATED].freeze
- SUCCESSFUL_STATUSES =
Successful statuses
[PAUSED, COMPLETED].freeze
- RUNNING_STATUSES =
Running statuses
[RUNNING, PAUSED].freeze
Class Method Summary collapse
-
.running?(status) ⇒ Boolean
Check if status is running.
-
.successful?(status) ⇒ Boolean
Check if status is successful.
-
.terminal?(status) ⇒ Boolean
Check if status is terminal (workflow has ended).
-
.valid?(status) ⇒ Boolean
Check if the given status is valid.
Class Method Details
.running?(status) ⇒ Boolean
Check if status is running
51 52 53 |
# File 'lib/conductor/http/models/workflow_status_constants.rb', line 51 def self.running?(status) RUNNING_STATUSES.include?(status) end |
.successful?(status) ⇒ Boolean
Check if status is successful
44 45 46 |
# File 'lib/conductor/http/models/workflow_status_constants.rb', line 44 def self.successful?(status) SUCCESSFUL_STATUSES.include?(status) end |
.terminal?(status) ⇒ Boolean
Check if status is terminal (workflow has ended)
37 38 39 |
# File 'lib/conductor/http/models/workflow_status_constants.rb', line 37 def self.terminal?(status) TERMINAL_STATUSES.include?(status) end |
.valid?(status) ⇒ Boolean
Check if the given status is valid
30 31 32 |
# File 'lib/conductor/http/models/workflow_status_constants.rb', line 30 def self.valid?(status) ALL.include?(status) end |