Sha256: 686a4224ec8a195315810d5b3144a0190f1f506a204df8e9dbb612642849144b

Contents?: true

Size: 291 Bytes

Versions: 68

Compression:

Stored size: 291 Bytes

Contents

require "faraday/middleware"

module Searchkick
  class Middleware < Faraday::Middleware
    def call(env)
      if env[:method] == :get && env[:url].path.to_s.end_with?("/_search")
        env[:request][:timeout] = Searchkick.search_timeout
      end
      @app.call(env)
    end
  end
end

Version data entries

68 entries across 68 versions & 4 rubygems

Version Path
searchkick-hooopo-2.3.1 lib/searchkick/middleware.rb
searchkick-hooopo-2.3.0 lib/searchkick/middleware.rb
searchkick-2.3.0 lib/searchkick/middleware.rb
searchkick-2.2.1 lib/searchkick/middleware.rb
searchkick-2.2.0 lib/searchkick/middleware.rb
searchkick-2.1.1 lib/searchkick/middleware.rb
searchkick-2.1.0 lib/searchkick/middleware.rb
searchkick-2.0.4 lib/searchkick/middleware.rb
searchkick-2.0.3 lib/searchkick/middleware.rb
searchkick-2.0.2 lib/searchkick/middleware.rb
searchkick-2.0.1 lib/searchkick/middleware.rb
searchkick-2.0.0 lib/searchkick/middleware.rb
searchkick-1.5.1 lib/searchkick/middleware.rb
searchkick-1.5.0 lib/searchkick/middleware.rb
searchkick-1.4.2 lib/searchkick/middleware.rb
searchkick-1.4.1 lib/searchkick/middleware.rb
searchkick-1.4.0 lib/searchkick/middleware.rb
searchkick-1.3.6 lib/searchkick/middleware.rb
searchkick-1.3.5 lib/searchkick/middleware.rb
searchkick-1.3.4 lib/searchkick/middleware.rb