Sha256: e22a1642cf5dc901d332687024e8e6b62c4ede11cec7d87a56890671d48b6577

Contents?: true

Size: 439 Bytes

Versions: 7

Compression:

Stored size: 439 Bytes

Contents

# frozen_string_literal: true

module Sidekiq
  # Server-side middleware must import this Module in order
  # to get access to server resources during `call`.
  module ServerMiddleware
    attr_accessor :config
    def redis_pool
      config.redis_pool
    end

    def logger
      config.logger
    end

    def redis(&block)
      config.redis(&block)
    end
  end

  # no difference for now
  ClientMiddleware = ServerMiddleware
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sidekiq-7.3.7 lib/sidekiq/middleware/modules.rb
sidekiq-7.3.6 lib/sidekiq/middleware/modules.rb
sidekiq-7.3.5 lib/sidekiq/middleware/modules.rb
sidekiq-7.3.4 lib/sidekiq/middleware/modules.rb
sidekiq-7.3.3 lib/sidekiq/middleware/modules.rb
sidekiq-7.3.2 lib/sidekiq/middleware/modules.rb
sidekiq-7.3.1 lib/sidekiq/middleware/modules.rb