Class: ActiveJob::Temporal::WorkerHealth::ActivityInbound

Inherits:
Temporalio::Worker::Interceptor::Activity::Inbound
  • Object
show all
Defined in:
lib/activejob/temporal/worker_health.rb

Instance Method Summary collapse

Constructor Details

#initialize(worker_health, next_interceptor) ⇒ ActivityInbound

Returns a new instance of ActivityInbound.



103
104
105
106
# File 'lib/activejob/temporal/worker_health.rb', line 103

def initialize(worker_health, next_interceptor)
  super(next_interceptor)
  @worker_health = worker_health
end

Instance Method Details

#execute(input) ⇒ Object



108
109
110
111
112
113
# File 'lib/activejob/temporal/worker_health.rb', line 108

def execute(input)
  @worker_health.record_task_started!
  super
ensure
  @worker_health.record_task_finished!
end