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

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

Instance Attribute Summary

Attributes inherited from Worker::Interceptor::ActivityOutbound

#next_interceptor

Instance Method Summary collapse

Constructor Details

#initialize(worker) ⇒ OutboundImplementation

Returns a new instance of OutboundImplementation.



327
328
329
330
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 327

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

Instance Method Details

#heartbeat(input) ⇒ Object



332
333
334
335
336
337
338
339
340
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 332

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