class Temporalio::Worker::WorkflowReplayer

def initialize(

Other tags:
    Yield: - If a block is present, this is the equivalent of calling {with_replay_worker} with the block and

Parameters:
  • runtime (Runtime) -- Runtime for this replayer.
  • debug_mode (Boolean) -- If true, deadlock detection is disabled. Deadlock detection will fail workflow tasks
  • workflow_payload_codec_thread_pool (ThreadPool, nil) -- Thread pool to run payload codec encode/decode
  • workflow_failure_exception_types (Array>) -- Workflow failure exception types. This is the
  • illegal_workflow_calls (Hash]>) -- Set of illegal workflow calls that are
  • logger (Logger) -- Logger to use. Defaults to stdout with warn level. Callers setting this logger are
  • identity (String, nil) -- Override the identity for this replater.
  • build_id (String) -- Unique identifier for the current runtime. This is best set as a unique value
  • interceptors (Array) -- Workflow interceptors.
  • workflow_executor (WorkflowExecutor) -- Workflow executor that workflow tasks run within. This must be a
  • data_converter (Converters::DataConverter) -- Data converter to use for all data conversions to/from
  • task_queue (String) -- Task queue as set in the workflow info.
  • namespace (String) -- Namespace as set in the workflow info.
  • workflows (Array>) -- Workflows for this replayer.
def initialize(
  workflows:,
  namespace: 'ReplayNamespace',
  task_queue: 'ReplayTaskQueue',
  data_converter: Converters::DataConverter.default,
  workflow_executor: WorkflowExecutor::ThreadPool.default,
  interceptors: [],
  build_id: Worker.default_build_id,
  identity: nil,
  logger: Logger.new($stdout, level: Logger::WARN),
  illegal_workflow_calls: Worker.default_illegal_workflow_calls,
  workflow_failure_exception_types: [],
  workflow_payload_codec_thread_pool: nil,
  debug_mode: %w[true 1].include?(ENV['TEMPORAL_DEBUG'].to_s.downcase),
  runtime: Runtime.default,
  &
)
  @options = Options.new(
    workflows:,
    namespace:,
    task_queue:,
    data_converter:,
    workflow_executor:,
    interceptors:,
    build_id:,
    identity:,
    logger:,
    illegal_workflow_calls:,
    workflow_failure_exception_types:,
    workflow_payload_codec_thread_pool:,
    debug_mode:,
    runtime:
  ).freeze
  # Preload definitions and other settings
  @workflow_definitions = Internal::Worker::WorkflowWorker.workflow_definitions(workflows)
  @nondeterminism_as_workflow_fail, @nondeterminism_as_workflow_fail_for_types =
    Internal::Worker::WorkflowWorker.bridge_workflow_failure_exception_type_options(
      workflow_failure_exception_types:, workflow_definitions: @workflow_definitions
    )
  # If there is a block, we'll go ahead and assume it's for with_replay_worker
  with_replay_worker(&) if block_given? # steep:ignore
end