Class: Temporalio::Activity::CancellationDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/temporalio/activity/cancellation_details.rb

Overview

Details that are set when an activity is cancelled. This is only valid at the time the cancel was received, the state may change on the server after it is received.

Instance Method Summary collapse

Constructor Details

#initialize(gone_from_server: false, cancel_requested: true, timed_out: false, worker_shutdown: false, paused: false, reset: false) ⇒ CancellationDetails



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/temporalio/activity/cancellation_details.rb', line 10

def initialize(
  gone_from_server: false,
  cancel_requested: true,
  timed_out: false,
  worker_shutdown: false,
  paused: false,
  reset: false
)
  @gone_from_server = gone_from_server
  @cancel_requested = cancel_requested
  @timed_out = timed_out
  @worker_shutdown = worker_shutdown
  @paused = paused
  @reset = reset
end

Instance Method Details

#cancel_requested?Boolean



33
34
35
# File 'lib/temporalio/activity/cancellation_details.rb', line 33

def cancel_requested?
  @cancel_requested
end

#gone_from_server?Boolean



28
29
30
# File 'lib/temporalio/activity/cancellation_details.rb', line 28

def gone_from_server?
  @gone_from_server
end

#paused?Boolean



48
49
50
# File 'lib/temporalio/activity/cancellation_details.rb', line 48

def paused?
  @paused
end

#reset?Boolean



53
54
55
# File 'lib/temporalio/activity/cancellation_details.rb', line 53

def reset?
  @reset
end

#timed_out?Boolean



38
39
40
# File 'lib/temporalio/activity/cancellation_details.rb', line 38

def timed_out?
  @timed_out
end

#worker_shutdown?Boolean



43
44
45
# File 'lib/temporalio/activity/cancellation_details.rb', line 43

def worker_shutdown?
  @worker_shutdown
end