Exception: UberTask::RetryTask
- Inherits:
-
Exception
- Object
- Exception
- UberTask::RetryTask
- Defined in:
- lib/uber_task/retry_task.rb
Overview
We are inheriting from Exception to make sure it won’t be caught by accident which would affect the flow the tasks.
Instance Attribute Summary collapse
-
#reason ⇒ Object
rubocop:disable Lint/InheritException.
-
#wait ⇒ Object
rubocop:disable Lint/InheritException.
Instance Method Summary collapse
-
#initialize(reason: nil, wait: 0) ⇒ RetryTask
constructor
A new instance of RetryTask.
Constructor Details
#initialize(reason: nil, wait: 0) ⇒ RetryTask
Returns a new instance of RetryTask.
10 11 12 13 14 15 16 |
# File 'lib/uber_task/retry_task.rb', line 10 def initialize(reason: nil, wait: 0) validate_wait_value!(wait) super('Requested to retry the task.') @reason = reason @wait = wait end |
Instance Attribute Details
#reason ⇒ Object
rubocop:disable Lint/InheritException
7 8 9 |
# File 'lib/uber_task/retry_task.rb', line 7 def reason @reason end |
#wait ⇒ Object
rubocop:disable Lint/InheritException
7 8 9 |
# File 'lib/uber_task/retry_task.rb', line 7 def wait @wait end |