class Sidekiq::Throttled::Configuration
Configuration
holder.
Public Class Methods
new()
click to toggle source
Class constructor.
# File lib/sidekiq/throttled/configuration.rb, line 8 def initialize reset! end
Public Instance Methods
inherit_strategies=(value)
click to toggle source
Instructs throttler to lookup strategies in parent classes, if there's no own strategy:
class Foo include Sidekiq::Worker include Sidekiq::Worker::Throttled sidekiq_throttle :concurrency => { :limit => 42 } end class Bar < Foo end
By default in the example above, `Bar` won't have throttling options. Set this flag to `true` to enable this lookup in initializer, after that `Bar` will use `Foo` throttling bucket.
# File lib/sidekiq/throttled/configuration.rb, line 37 def inherit_strategies=(value) @inherit_strategies = value ? true : false end
inherit_strategies?()
click to toggle source
Whenever throttled workers should inherit parent's strategies or not. Default: `false`.
@return [Boolean]
# File lib/sidekiq/throttled/configuration.rb, line 45 def inherit_strategies? @inherit_strategies end
reset!()
click to toggle source
Reset configuration to defaults.
@return [self]
# File lib/sidekiq/throttled/configuration.rb, line 15 def reset! @inherit_strategies = false self end