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

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

Instance Attribute Summary

Attributes inherited from Worker::Interceptor::ActivityInbound

#next_interceptor

Instance Method Summary collapse

Constructor Details

#initialize(worker) ⇒ InboundImplementation

Returns a new instance of InboundImplementation.



309
310
311
312
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 309

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

Instance Method Details

#execute(input) ⇒ Object



321
322
323
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 321

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

#init(outbound) ⇒ Object



314
315
316
317
318
319
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 314

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

  context._outbound_impl = outbound
end