Class: Cadence::Workflow::ExecutionInfo
- Inherits:
-
Struct
- Object
- Struct
- Cadence::Workflow::ExecutionInfo
- Defined in:
- lib/cadence/workflow/execution_info.rb
Constant Summary collapse
- RUNNING_STATUS =
:RUNNING
- COMPLETED_STATUS =
:COMPLETED
- FAILED_STATUS =
:FAILED
- CANCELED_STATUS =
:CANCELED
- TERMINATED_STATUS =
:TERMINATED
- CONTINUED_AS_NEW_STATUS =
:CONTINUED_AS_NEW
- TIMED_OUT_STATUS =
:TIMED_OUT
- VALID_STATUSES =
[ RUNNING_STATUS, COMPLETED_STATUS, FAILED_STATUS, CANCELED_STATUS, TERMINATED_STATUS, CONTINUED_AS_NEW_STATUS, TIMED_OUT_STATUS ].freeze
Instance Attribute Summary collapse
-
#close_time ⇒ Object
Returns the value of attribute close_time.
-
#history_length ⇒ Object
Returns the value of attribute history_length.
-
#run_id ⇒ Object
Returns the value of attribute run_id.
-
#start_time ⇒ Object
Returns the value of attribute start_time.
-
#status ⇒ Object
Returns the value of attribute status.
-
#workflow ⇒ Object
Returns the value of attribute workflow.
-
#workflow_id ⇒ Object
Returns the value of attribute workflow_id.
Class Method Summary collapse
Instance Attribute Details
#close_time ⇒ Object
Returns the value of attribute close_time
5 6 7 |
# File 'lib/cadence/workflow/execution_info.rb', line 5 def close_time @close_time end |
#history_length ⇒ Object
Returns the value of attribute history_length
5 6 7 |
# File 'lib/cadence/workflow/execution_info.rb', line 5 def history_length @history_length end |
#run_id ⇒ Object
Returns the value of attribute run_id
5 6 7 |
# File 'lib/cadence/workflow/execution_info.rb', line 5 def run_id @run_id end |
#start_time ⇒ Object
Returns the value of attribute start_time
5 6 7 |
# File 'lib/cadence/workflow/execution_info.rb', line 5 def start_time @start_time end |
#status ⇒ Object
Returns the value of attribute status
5 6 7 |
# File 'lib/cadence/workflow/execution_info.rb', line 5 def status @status end |
#workflow ⇒ Object
Returns the value of attribute workflow
5 6 7 |
# File 'lib/cadence/workflow/execution_info.rb', line 5 def workflow @workflow end |
#workflow_id ⇒ Object
Returns the value of attribute workflow_id
5 6 7 |
# File 'lib/cadence/workflow/execution_info.rb', line 5 def workflow_id @workflow_id end |
Class Method Details
.generate_from(response) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/cadence/workflow/execution_info.rb', line 24 def self.generate_from(response) status = ::CadenceThrift::WorkflowExecutionCloseStatus::VALUE_MAP[response.closeStatus] new( workflow: response.type.name, workflow_id: response.execution.workflowId, run_id: response.execution.runId, start_time: Utils.time_from_nanos(response.startTime), close_time: Utils.time_from_nanos(response.closeTime), status: status&.to_sym || RUNNING_STATUS, history_length: response.historyLength, ).freeze end |