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.



420
421
422
423
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 420

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

Instance Method Details

#execute(input) ⇒ Object



432
433
434
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 432

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

#init(outbound) ⇒ Object



425
426
427
428
429
430
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 425

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

  context._outbound_impl = outbound
end