Class: Conductor::Worker::Events::TaskUpdateFailure
- Inherits:
-
TaskRunnerEvent
- Object
- ConductorEvent
- TaskRunnerEvent
- Conductor::Worker::Events::TaskUpdateFailure
- Defined in:
- lib/conductor/worker/events/task_runner_events.rb
Overview
Published when task update fails after all retries This is a CRITICAL event - the task result is lost
Instance Attribute Summary collapse
-
#cause ⇒ Object
readonly
Returns the value of attribute cause.
-
#duration_ms ⇒ Object
readonly
Returns the value of attribute duration_ms.
-
#retry_count ⇒ Object
readonly
Returns the value of attribute retry_count.
-
#task_id ⇒ Object
readonly
Returns the value of attribute task_id.
-
#task_result ⇒ Object
readonly
Returns the value of attribute task_result.
-
#worker_id ⇒ Object
readonly
Returns the value of attribute worker_id.
-
#workflow_instance_id ⇒ Object
readonly
Returns the value of attribute workflow_instance_id.
Attributes inherited from TaskRunnerEvent
Attributes inherited from ConductorEvent
Instance Method Summary collapse
-
#initialize(task_type:, task_id:, worker_id:, workflow_instance_id:, cause:, retry_count:, task_result:, duration_ms: nil) ⇒ TaskUpdateFailure
constructor
A new instance of TaskUpdateFailure.
- #to_h ⇒ Object
Constructor Details
#initialize(task_type:, task_id:, worker_id:, workflow_instance_id:, cause:, retry_count:, task_result:, duration_ms: nil) ⇒ TaskUpdateFailure
Returns a new instance of TaskUpdateFailure.
216 217 218 219 220 221 222 223 224 225 226 |
# File 'lib/conductor/worker/events/task_runner_events.rb', line 216 def initialize(task_type:, task_id:, worker_id:, workflow_instance_id:, cause:, retry_count:, task_result:, duration_ms: nil) super(task_type: task_type) @task_id = task_id @worker_id = worker_id @workflow_instance_id = workflow_instance_id @cause = cause @retry_count = retry_count @task_result = task_result @duration_ms = duration_ms end |
Instance Attribute Details
#cause ⇒ Object (readonly)
Returns the value of attribute cause.
213 214 215 |
# File 'lib/conductor/worker/events/task_runner_events.rb', line 213 def cause @cause end |
#duration_ms ⇒ Object (readonly)
Returns the value of attribute duration_ms.
213 214 215 |
# File 'lib/conductor/worker/events/task_runner_events.rb', line 213 def duration_ms @duration_ms end |
#retry_count ⇒ Object (readonly)
Returns the value of attribute retry_count.
213 214 215 |
# File 'lib/conductor/worker/events/task_runner_events.rb', line 213 def retry_count @retry_count end |
#task_id ⇒ Object (readonly)
Returns the value of attribute task_id.
213 214 215 |
# File 'lib/conductor/worker/events/task_runner_events.rb', line 213 def task_id @task_id end |
#task_result ⇒ Object (readonly)
Returns the value of attribute task_result.
213 214 215 |
# File 'lib/conductor/worker/events/task_runner_events.rb', line 213 def task_result @task_result end |
#worker_id ⇒ Object (readonly)
Returns the value of attribute worker_id.
213 214 215 |
# File 'lib/conductor/worker/events/task_runner_events.rb', line 213 def worker_id @worker_id end |
#workflow_instance_id ⇒ Object (readonly)
Returns the value of attribute workflow_instance_id.
213 214 215 |
# File 'lib/conductor/worker/events/task_runner_events.rb', line 213 def workflow_instance_id @workflow_instance_id end |
Instance Method Details
#to_h ⇒ Object
228 229 230 231 232 233 234 235 |
# File 'lib/conductor/worker/events/task_runner_events.rb', line 228 def to_h super.merge( task_id: @task_id, worker_id: @worker_id, workflow_instance_id: @workflow_instance_id, cause: @cause.class.name, cause_message: @cause., retry_count: @retry_count, duration_ms: @duration_ms ) end |