Class: Temporalio::Internal::Worker::ActivityWorker::OutboundImplementation

Inherits:
Worker::Interceptor::Activity::Outbound show all
Defined in:
lib/temporalio/internal/worker/activity_worker.rb

Instance Attribute Summary

Attributes inherited from Worker::Interceptor::Activity::Outbound

#next_interceptor

Instance Method Summary collapse

Constructor Details

#initialize(worker, task_token) ⇒ OutboundImplementation

Returns a new instance of OutboundImplementation.



429
430
431
432
433
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 429

def initialize(worker, task_token)
  super(nil) # steep:ignore
  @worker = worker
  @task_token = task_token
end

Instance Method Details

#heartbeat(input) ⇒ Object



435
436
437
438
439
440
441
442
443
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 435

def heartbeat(input)
  @worker.bridge_worker.record_activity_heartbeat(
    Bridge::Api::CoreInterface::ActivityHeartbeat.new(
      task_token: @task_token,
      details: ProtoUtils.convert_to_payload_array(@worker.worker.options.client.data_converter,
                                                   input.details)
    ).to_proto
  )
end