Class: Temporalio::Internal::Worker::ActivityWorker::RunningActivity

Inherits:
Activity::Context
  • Object
show all
Defined in:
lib/temporalio/internal/worker/activity_worker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Activity::Context

current, current_or_nil, exist?

Constructor Details

#initialize(info:, cancellation:, worker_shutdown_cancellation:, payload_converter:, logger:) ⇒ RunningActivity

rubocop:disable Lint/MissingSuper



285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 285

def initialize( # rubocop:disable Lint/MissingSuper
  info:,
  cancellation:,
  worker_shutdown_cancellation:,
  payload_converter:,
  logger:
)
  @info = info
  @cancellation = cancellation
  @worker_shutdown_cancellation = worker_shutdown_cancellation
  @payload_converter = payload_converter
  @logger = logger
  @_outbound_impl = nil
  @_server_requested_cancel = false
end

Instance Attribute Details

#_outbound_implObject

Returns the value of attribute _outbound_impl.



283
284
285
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 283

def _outbound_impl
  @_outbound_impl
end

#_server_requested_cancelObject

Returns the value of attribute _server_requested_cancel.



283
284
285
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 283

def _server_requested_cancel
  @_server_requested_cancel
end

#cancellationObject (readonly)

Returns the value of attribute cancellation.



282
283
284
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 282

def cancellation
  @cancellation
end

#infoObject (readonly)

Returns the value of attribute info.



282
283
284
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 282

def info
  @info
end

#loggerObject (readonly)

Returns the value of attribute logger.



282
283
284
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 282

def logger
  @logger
end

#payload_converterObject (readonly)

Returns the value of attribute payload_converter.



282
283
284
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 282

def payload_converter
  @payload_converter
end

#worker_shutdown_cancellationObject (readonly)

Returns the value of attribute worker_shutdown_cancellation.



282
283
284
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 282

def worker_shutdown_cancellation
  @worker_shutdown_cancellation
end

Instance Method Details

#heartbeat(*details) ⇒ Object



301
302
303
304
305
# File 'lib/temporalio/internal/worker/activity_worker.rb', line 301

def heartbeat(*details)
  raise 'Implementation not set yet' if _outbound_impl.nil?

  _outbound_impl.heartbeat(Temporalio::Worker::Interceptor::HeartbeatActivityInput.new(details:))
end