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) ⇒ OutboundImplementation

Returns a new instance of OutboundImplementation.



367
368
369
370
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 367

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

Instance Method Details

#heartbeat(input) ⇒ Object



372
373
374
375
376
377
378
379
380
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 372

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