Sha256: ace3b6fb2db235babfdf236ae49a69f1da737f0b227c38ae6175f222a276a622

Contents?: true

Size: 489 Bytes

Versions: 13

Compression:

Stored size: 489 Bytes

Contents

module RorVsWild
  module Plugin
    class Sidekiq
      def self.setup
        if defined?(::Sidekiq)
          ::Sidekiq.configure_server do |config|
            config.server_middleware { |chain| chain.add(Sidekiq) }
          end
        end
      end

      def call(worker, item, queue, &block)
        # Wrapped contains the real class name of the ActiveJob wrapper
        RorVsWild.measure_block(item["wrapped".freeze] || item["class".freeze], &block)
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
rorvswild-1.0.1 lib/rorvswild/plugin/sidekiq.rb
rorvswild-1.0.0 lib/rorvswild/plugin/sidekiq.rb
rorvswild-1.0.0.pre.alpha8 lib/rorvswild/plugin/sidekiq.rb
rorvswild-1.0.0.pre.alpha7 lib/rorvswild/plugin/sidekiq.rb
rorvswild-1.0.0.pre.alpha6 lib/rorvswild/plugin/sidekiq.rb
rorvswild-1.0.0.pre.alpha5 lib/rorvswild/plugin/sidekiq.rb
rorvswild-1.0.0.pre.alpha4 lib/rorvswild/plugin/sidekiq.rb
rorvswild-1.0.0.pre.alpha3 lib/rorvswild/plugin/sidekiq.rb
rorvswild-1.0.0.pre.alpha2 lib/rorvswild/plugin/sidekiq.rb
rorvswild-1.0.0.pre.alpha lib/rorvswild/plugin/sidekiq.rb
rorvswild-0.6.1 lib/rorvswild/plugin/sidekiq.rb
rorvswild-0.6.0 lib/rorvswild/plugin/sidekiq.rb
rorvswild-0.5.1 lib/rorvswild/plugin/sidekiq.rb