Class: Rage::Deferred::DeadTask
- Inherits:
-
Object
- Object
- Rage::Deferred::DeadTask
- Defined in:
- lib/rage/deferred/dead_task.rb
Overview
Instance Attribute Summary collapse
-
#attempts ⇒ Integer
readonly
The number of processing attempts.
-
#backtrace ⇒ Array<String>
readonly
The frozen backtrace from the last exception.
-
#enqueued_at ⇒ Time
readonly
The time when Rage enqueued the task.
-
#exception_class ⇒ String
readonly
The class name of the last exception.
-
#exception_message ⇒ String
readonly
The message from the last exception.
-
#failed_at ⇒ Time
readonly
The time when the last attempt failed.
-
#id ⇒ String
readonly
The ID that Rage assigned when it enqueued the task.
-
#task_class ⇒ String
readonly
The name of the task class.
Instance Method Summary collapse
-
#args ⇒ Array
Return the original positional arguments.
-
#kwargs ⇒ Hash
Return the original keyword arguments.
Instance Attribute Details
#attempts ⇒ Integer (readonly)
Returns the number of processing attempts.
17 18 19 |
# File 'lib/rage/deferred/dead_task.rb', line 17 def attempts @attempts end |
#backtrace ⇒ Array<String> (readonly)
Returns the frozen backtrace from the last exception.
32 33 34 |
# File 'lib/rage/deferred/dead_task.rb', line 32 def backtrace @backtrace end |
#enqueued_at ⇒ Time (readonly)
Returns the time when Rage enqueued the task.
20 21 22 |
# File 'lib/rage/deferred/dead_task.rb', line 20 def enqueued_at @enqueued_at end |
#exception_class ⇒ String (readonly)
Returns the class name of the last exception.
26 27 28 |
# File 'lib/rage/deferred/dead_task.rb', line 26 def exception_class @exception_class end |
#exception_message ⇒ String (readonly)
Returns the message from the last exception.
29 30 31 |
# File 'lib/rage/deferred/dead_task.rb', line 29 def @exception_message end |
#failed_at ⇒ Time (readonly)
Returns the time when the last attempt failed.
23 24 25 |
# File 'lib/rage/deferred/dead_task.rb', line 23 def failed_at @failed_at end |
#id ⇒ String (readonly)
Returns the ID that Rage assigned when it enqueued the task.
11 12 13 |
# File 'lib/rage/deferred/dead_task.rb', line 11 def id @id end |
#task_class ⇒ String (readonly)
Returns the name of the task class.
14 15 16 |
# File 'lib/rage/deferred/dead_task.rb', line 14 def task_class @task_class end |
Instance Method Details
#args ⇒ Array
Return the original positional arguments.
On the first call, the method deserializes the execution context.
The method freezes all objects in the decoded data.
After a successful call, the method returns the same Array on each later call.
If the stored value is nil, the method returns a frozen empty Array.
57 58 59 60 |
# File 'lib/rage/deferred/dead_task.rb', line 57 def args decode_context unless defined?(@__args) @__args end |
#kwargs ⇒ Hash
Return the original keyword arguments.
On the first call, the method deserializes the execution context.
The method freezes all objects in the decoded data.
After a successful call, the method returns the same Hash on each later call.
If the stored value is nil, the method returns a frozen empty Hash.
71 72 73 74 |
# File 'lib/rage/deferred/dead_task.rb', line 71 def kwargs decode_context unless defined?(@__kwargs) @__kwargs end |