Sha256: 2211755b76478a1f54167b3345a996e74b910372907ee90808ee2b67be8c041f
Contents?: true
Size: 709 Bytes
Versions: 9
Compression:
Stored size: 709 Bytes
Contents
module Sunspot module Rails module SolrInstrumentation extend ActiveSupport::Concern included do alias_method :send_and_receive_without_as_instrumentation, :send_and_receive alias_method :send_and_receive, :send_and_receive_with_as_instrumentation end def send_and_receive_with_as_instrumentation(path, opts) parameters = (opts[:params] || {}) parameters.merge!(opts[:data]) if opts[:data].is_a? Hash payload = {:path => path, :parameters => parameters} ActiveSupport::Notifications.instrument("request.rsolr", payload) do send_and_receive_without_as_instrumentation(path, opts) end end end end end
Version data entries
9 entries across 9 versions & 2 rubygems