Exception: Delayed::WorkerTimeout

Inherits:
Exception
  • Object
show all
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

Instance Method Details

#messageObject

rubocop:disable Lint/InheritException



8
9
10
11
# File 'lib/delayed/exceptions.rb', line 8

def message
  seconds = Delayed::Worker.max_run_time.to_i
  "#{super} (Delayed::Worker.max_run_time is only #{seconds} second#{seconds == 1 ? '' : 's'})"
end