Class: Sidekiq::RequeueMissingClass::Configuration
- Inherits:
-
Object
- Object
- Sidekiq::RequeueMissingClass::Configuration
- Defined in:
- lib/sidekiq/requeue_missing_class/configuration.rb
Overview
Tunables for the middleware. Configure via:
Sidekiq::RequeueMissingClass.configure do |c|
c.delay = 15
c.max_requeues = 20
end
Instance Attribute Summary collapse
-
#delay ⇒ Object
Seconds to wait before a re-queued job becomes available again.
-
#logger ⇒ Object
Anything responding to #info, or nil to stay quiet.
-
#max_requeues ⇒ Object
How many times a single job may be re-queued before we give up and let it run (so the usual "unknown class" error surfaces instead of looping forever when the class is genuinely gone).
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
23 24 25 26 27 |
# File 'lib/sidekiq/requeue_missing_class/configuration.rb', line 23 def initialize @delay = 30 @max_requeues = 10 @logger = Sidekiq.logger end |
Instance Attribute Details
#delay ⇒ Object
Seconds to wait before a re-queued job becomes available again.
13 14 15 |
# File 'lib/sidekiq/requeue_missing_class/configuration.rb', line 13 def delay @delay end |
#logger ⇒ Object
Anything responding to #info, or nil to stay quiet.
21 22 23 |
# File 'lib/sidekiq/requeue_missing_class/configuration.rb', line 21 def logger @logger end |
#max_requeues ⇒ Object
How many times a single job may be re-queued before we give up and let it run (so the usual "unknown class" error surfaces instead of looping forever when the class is genuinely gone).
18 19 20 |
# File 'lib/sidekiq/requeue_missing_class/configuration.rb', line 18 def max_requeues @max_requeues end |