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



340
341
342
343
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 340

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

Instance Method Details

#execute(input) ⇒ Object



352
353
354
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 352

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

#init(outbound) ⇒ Object



345
346
347
348
349
350
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 345

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

  context._outbound_impl = outbound
end