Sha256: 037033f1950261e400389bc855a5949d7112171b1f5d81229917cd15c41ec8aa

Contents?: true

Size: 806 Bytes

Versions: 25

Compression:

Stored size: 806 Bytes

Contents

require 'sidekiq'
require 'penthouse/sidekiq/middleware/client'
require 'penthouse/sidekiq/middleware/server'

module Penthouse
  module Sidekiq
    module Middleware

      def self.run
        ::Sidekiq.configure_client do |config|
          config.client_middleware do |chain|
            chain.add Penthouse::Sidekiq::Middleware::Client
          end
        end

        ::Sidekiq.configure_server do |config|
          config.client_middleware do |chain|
            chain.add Penthouse::Sidekiq::Middleware::Client
          end

          config.server_middleware do |chain|
            chain.insert_before ::Sidekiq::Middleware::Server::RetryJobs, Penthouse::Sidekiq::Middleware::Server
          end
        end
      end
    end
  end
end

require 'penthouse/sidekiq/railtie' if defined?(Rails)

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
penthouse-0.13.2 lib/penthouse/sidekiq.rb
penthouse-0.13.1 lib/penthouse/sidekiq.rb
penthouse-0.13 lib/penthouse/sidekiq.rb
penthouse-0.12.2 lib/penthouse/sidekiq.rb
penthouse-0.12.1 lib/penthouse/sidekiq.rb
penthouse-0.12.0 lib/penthouse/sidekiq.rb
penthouse-0.11.0 lib/penthouse/sidekiq.rb
penthouse-0.10.1 lib/penthouse/sidekiq.rb
penthouse-0.10.0 lib/penthouse/sidekiq.rb
penthouse-0.9.0 lib/penthouse/sidekiq.rb
penthouse-0.8.0 lib/penthouse/sidekiq.rb
penthouse-0.7.5 lib/penthouse/sidekiq.rb
penthouse-0.7.4 lib/penthouse/sidekiq.rb
penthouse-0.7.3 lib/penthouse/sidekiq.rb
penthouse-0.7.2 lib/penthouse/sidekiq.rb
penthouse-0.7.1 lib/penthouse/sidekiq.rb
penthouse-0.7.0 lib/penthouse/sidekiq.rb
penthouse-0.6.0 lib/penthouse/sidekiq.rb
penthouse-0.5.0 lib/penthouse/sidekiq.rb
penthouse-0.4.2 lib/penthouse/sidekiq.rb