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.



411
412
413
414
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 411

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

Instance Method Details

#execute(input) ⇒ Object



423
424
425
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 423

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

#init(outbound) ⇒ Object



416
417
418
419
420
421
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 416

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

  context._outbound_impl = outbound
end