module Sidekiq::ThrottledWorker
Constants
- VERSION
Public Class Methods
redis()
click to toggle source
# File lib/sidekiq/throttled_worker.rb, line 28 def redis @redis ||= Sidekiq.redis_pool end
redis=(hash)
click to toggle source
# File lib/sidekiq/throttled_worker.rb, line 20 def redis=(hash) @redis = if hash.is_a?(ConnectionPool) hash else Sidekiq::RedisConnection.create(hash) end end
setup!()
click to toggle source
# File lib/sidekiq/throttled_worker.rb, line 7 def setup! Sidekiq.configure_server do |config| require 'sidekiq/throttled_worker/fetch' require 'sidekiq/throttled_worker/middleware' require 'sidekiq/throttled_worker/concurrency' Sidekiq.options[:fetch] = Sidekiq::ThrottledWorker::Fetch config.server_middleware do |chain| chain.add Sidekiq::ThrottledWorker::Middleware end end end