class RorVsWild::Plugin::Faktory
Public Class Methods
Source
# File lib/rorvswild/plugin/faktory.rb, line 4 def self.setup if defined?(::Faktory) ::Faktory.configure_worker do |config| config.worker_middleware { |chain| chain.add(Faktory) } end end end
Public Instance Methods
Source
# File lib/rorvswild/plugin/faktory.rb, line 12 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