class Cadence::Workflow::ExecutionInfo

Constants

CANCELED_STATUS
COMPLETED_STATUS
CONTINUED_AS_NEW_STATUS
FAILED_STATUS
RUNNING_STATUS
TERMINATED_STATUS
TIMED_OUT_STATUS
VALID_STATUSES

Public Class Methods

generate_from(response) click to toggle source
# 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