Sha256: 9b30943c76e7c11a6b25704a39d1f74f0ae8d2acc60d4451789a3ed5ee0ae531

Contents?: true

Size: 527 Bytes

Versions: 28

Compression:

Stored size: 527 Bytes

Contents

module RorVsWild
  module Plugin
    class Faktory
      def self.setup
        if defined?(::Faktory)
          ::Faktory.configure_worker do |config|
            config.worker_middleware { |chain| chain.add(Faktory) }
          end
        end
      end

      def call(worker_instance, job, &block)
        custom = job["custom".freeze]
        name = (custom && custom["wrapped".freeze]) || job["jobtype".freeze]
        RorVsWild.agent.measure_job(name, parameters: job["args".freeze], &block)
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
rorvswild-1.8.1 lib/rorvswild/plugin/faktory.rb
rorvswild-1.8.0 lib/rorvswild/plugin/faktory.rb
rorvswild-1.7.1 lib/rorvswild/plugin/faktory.rb
rorvswild-1.7.0 lib/rorvswild/plugin/faktory.rb
rorvswild-1.6.5 lib/rorvswild/plugin/faktory.rb
rorvswild-1.6.4 lib/rorvswild/plugin/faktory.rb
rorvswild-1.6.3 lib/rorvswild/plugin/faktory.rb
rorvswild-1.6.2 lib/rorvswild/plugin/faktory.rb
rorvswild-1.6.1 lib/rorvswild/plugin/faktory.rb
rorvswild-1.6.0 lib/rorvswild/plugin/faktory.rb
rorvswild-1.5.17 lib/rorvswild/plugin/faktory.rb
rorvswild-1.5.16 lib/rorvswild/plugin/faktory.rb
rorvswild-1.5.15 lib/rorvswild/plugin/faktory.rb
rorvswild-1.5.14 lib/rorvswild/plugin/faktory.rb
rorvswild-1.5.13 lib/rorvswild/plugin/faktory.rb
rorvswild-1.5.12 lib/rorvswild/plugin/faktory.rb
rorvswild-1.5.11 lib/rorvswild/plugin/faktory.rb
rorvswild-1.5.10 lib/rorvswild/plugin/faktory.rb
rorvswild-1.5.9 lib/rorvswild/plugin/faktory.rb
rorvswild-1.5.8 lib/rorvswild/plugin/faktory.rb