Module: Temporalio::Worker::Interceptor::Activity

Defined in:
lib/temporalio/worker/interceptor.rb

Overview

Note:

Input classes herein may get new required fields added and therefore the constructors of the Input classes may change in backwards incompatible ways. Users should not try to construct Input classes themselves.

Mixin for intercepting activity worker work. Clases that ‘include` may implement their own #intercept_activity that returns their own instance of Inbound.

Defined Under Namespace

Classes: Inbound, Outbound

Constant Summary collapse

ExecuteInput =

Input for Inbound#execute.

Data.define(
  :proc,
  :args,
  :headers
)
HeartbeatInput =

Input for Outbound#heartbeat.

Data.define(
  :details
)

Instance Method Summary collapse

Instance Method Details

#intercept_activity(next_interceptor) ⇒ Inbound

Method called when intercepting an activity. This is called when starting an activity attempt.

Parameters:

  • next_interceptor (Inbound)

    Next interceptor in the chain that should be called. This is usually passed to Inbound constructor.

Returns:

  • (Inbound)

    Interceptor to be called for activity calls.



17
18
19
# File 'lib/temporalio/worker/interceptor.rb', line 17

def intercept_activity(next_interceptor)
  next_interceptor
end