Class: Temporalio::Internal::Worker::ActivityWorker::InboundImplementation

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

Instance Attribute Summary

Attributes inherited from Worker::Interceptor::Activity::Inbound

#next_interceptor

Instance Method Summary collapse

Constructor Details

#initialize(worker) ⇒ InboundImplementation

Returns a new instance of InboundImplementation.



337
338
339
340
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 337

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

Instance Method Details

#execute(input) ⇒ Object



349
350
351
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 349

def execute(input)
  input.proc.call(*input.args)
end

#init(outbound) ⇒ Object



342
343
344
345
346
347
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 342

def init(outbound)
  context = Activity::Context.current
  raise 'Unexpected context type' unless context.is_a?(RunningActivity)

  context._outbound_impl = outbound
end