Exception: Delayed::WorkerTimeout
- Inherits:
-
Exception
- Object
- Exception
- Delayed::WorkerTimeout
- Defined in:
- lib/delayed/exceptions.rb
Overview
We inherit from Exception because we want timeouts to bubble up to the worker thread where they can be handled appropriately. (If we inherited from StandardError, jobs are more likely to inadvertently ‘rescue` it directly.)
Instance Method Summary collapse
-
#message ⇒ Object
rubocop:disable Lint/InheritException.
Instance Method Details
#message ⇒ Object
rubocop:disable Lint/InheritException
8 9 10 11 |
# File 'lib/delayed/exceptions.rb', line 8 def seconds = Delayed::Worker.max_run_time.to_i "#{super} (Delayed::Worker.max_run_time is only #{seconds} second#{seconds == 1 ? '' : 's'})" end |