Class: Conductor::Worker::Events::ThreadUncaughtException
- Inherits:
-
ConductorEvent
- Object
- ConductorEvent
- Conductor::Worker::Events::ThreadUncaughtException
- Defined in:
- lib/conductor/worker/events/task_runner_events.rb
Overview
Published when a worker thread terminates with an uncaught exception
Instance Attribute Summary collapse
-
#cause ⇒ Object
readonly
Returns the value of attribute cause.
-
#task_type ⇒ Object
readonly
Returns the value of attribute task_type.
Attributes inherited from ConductorEvent
Instance Method Summary collapse
-
#initialize(cause:, task_type: nil) ⇒ ThreadUncaughtException
constructor
A new instance of ThreadUncaughtException.
- #to_h ⇒ Object
Constructor Details
#initialize(cause:, task_type: nil) ⇒ ThreadUncaughtException
Returns a new instance of ThreadUncaughtException.
245 246 247 248 249 |
# File 'lib/conductor/worker/events/task_runner_events.rb', line 245 def initialize(cause:, task_type: nil) super() @cause = cause @task_type = task_type end |
Instance Attribute Details
#cause ⇒ Object (readonly)
Returns the value of attribute cause.
243 244 245 |
# File 'lib/conductor/worker/events/task_runner_events.rb', line 243 def cause @cause end |
#task_type ⇒ Object (readonly)
Returns the value of attribute task_type.
243 244 245 |
# File 'lib/conductor/worker/events/task_runner_events.rb', line 243 def task_type @task_type end |
Instance Method Details
#to_h ⇒ Object
251 252 253 |
# File 'lib/conductor/worker/events/task_runner_events.rb', line 251 def to_h super.merge(cause: @cause.class.name, cause_message: @cause., task_type: @task_type) end |