RSolr::Error::Http in SearchController#show. Скидки молоко


Смеситель Для Встряхивания Молока Оптовых

13 было найдено Смеситель Для Встряхивания Молока Оптовых

Отправить в:

Страны/регионы

Фильтр

Другие товары, которые могут быть вам интересны

Оптовые Смеситель Для Встряхивания Молока онлайн

4 5 25 Обзоры

Купить оптовые смеситель для встряхивания молока прямо на ru.dhgate.com. Приглашаем вас ознакомиться с ассортиментом смеситель для встряхивания молока и приобрести по цене производителя. Вы можете найти все смеситель для встряхивания молока на низкой цене в DHgate. Мы предлагаем заводские цены на каждый товар от смеситель для встряхивания молока до смеситель для встряхивания молока, с доставкой по всему миру!

ru.dhgate.com

предложения недели и акции на продукты

Пятница 04/05

Сыр плавленый Рresident сливочный 45%, 400 г

Молочная гастрономия

Сыр плавленый Рresident сливочный 45%, 400 г

Акция действует 04/05

Пятница 04/05

Молоко Домик в деревне ультрапастеризованное 3,2%, 950 г

Молочная гастрономия

Молоко Домик в деревне ультрапастеризованное 3,2%, 950 г

Акция действует 04/05

АКЦИЯ&nbsp30/04—06/05

Сырок глазированный Б.Ю.Александров ваниль в молочом шоколаде 15%, 150 г***

Молочная гастрономия

Сырок глазированный Б.Ю.Александров ваниль в молочом шоколаде 15%, 150 г***

Акция действует 30/04—06/05

АКЦИЯ&nbsp30/04—06/05

Творог Романов луг обезжиренный 0,5%, 290/320 г

Молочная гастрономия

Творог Романов луг обезжиренный 0,5%, 290/320 г

Акция действует 30/04—06/05

АКЦИЯ&nbsp30/04—06/05

Творог Д Романов луг мягкий 5%, 200 г

Молочная гастрономия

Творог Д Романов луг мягкий 5%, 200 г

Акция действует 30/04—06/05

АКЦИЯ&nbsp30/04—06/05

Творог Бежин луг мягкий клубника-земляника; черника 4,2%, 160 г

Молочная гастрономия

Творог Бежин луг мягкий клубника-земляника; черника 4,2%, 160 г

Акция действует 30/04—06/05

АКЦИЯ&nbsp30/04—06/05

Молоко Домик в деревне деревенское отборное 3,5-4,5%, 930/950 мл

Молочная гастрономия

Молоко Домик в деревне деревенское отборное 3,5-4,5%, 930/950 мл

Акция действует 30/04—06/05

АКЦИЯ&nbsp30/04—06/05

Биойогурт Вio max черника; 5 витаминов персик; отруби-злаки; классический 2,5-3,2%, 125 г

Молочная гастрономия

Биойогурт Вio max черника; 5 витаминов персик; отруби-злаки; классический 2,5-3,2%, 125 г

Акция действует 30/04—06/05

АКЦИЯ&nbsp30/04—06/05

Йогурт Чудо молочный с джемом клубника; с фруктами на дне персик-манго 2,5%, 125 г

Молочная гастрономия

Йогурт Чудо молочный с джемом клубника; с фруктами на дне персик-манго 2,5%, 125 г

Акция действует 30/04—06/05

АКЦИЯ&nbsp30/04—06/05

Масло шоколадное высший сорт Экомилк 62%, 180 г

Молочная гастрономия

Масло шоколадное высший сорт Экомилк 62%, 180 г

Акция действует 30/04—06/05

АКЦИЯ&nbsp30/04—06/05

Сыр Natura Арла сливочный 45%, 200 г

Молочная гастрономия

Сыр Natura Арла сливочный 45%, 200 г

Акция действует 30/04—06/05

АКЦИЯ&nbsp30/04—06/05

Маргарин Хозяюшка сливочный 60%, 200 г

Молочная гастрономия

Маргарин Хозяюшка сливочный 60%, 200 г

Акция действует 30/04—06/05

АКЦИЯ&nbsp30/04—06/05

Сыр Адыгейский Д Сыргор мягкий 45%, 300 г

Молочная гастрономия

Сыр Адыгейский Д Сыргор мягкий 45%, 300 г

Акция действует 30/04—06/05

АКЦИЯ&nbsp30/04—06/05

Сыр плавленый Карат Дружба 55%, 90 г

Молочная гастрономия

Сыр плавленый Карат Дружба 55%, 90 г

Акция действует 30/04—06/05

АКЦИЯ&nbsp30/04—06/05

Сыр Тысяча озер утренний 45%, 240 г

Молочная гастрономия

Сыр Тысяча озер утренний 45%, 240 г

Акция действует 30/04—06/05

АКЦИЯ&nbsp30/04—06/05

Пудинг молочный Ehrmann Grand Dessert ваниль; шоколад 4,7%, 200 г

Молочная гастрономия

Пудинг молочный Ehrmann Grand Dessert ваниль; шоколад 4,7%, 200 г

Акция действует 30/04—06/05

АКЦИЯ&nbsp30/04—06/05

Сырок Романов луг творожный; с ванилью 23%, 45 г

Молочная гастрономия

Сырок Романов луг творожный; с ванилью 23%, 45 г

Акция действует 30/04—06/05

АКЦИЯ&nbsp30/04—06/05

Йогурт Греческий натуральный 2%, 140 г

Молочная гастрономия

Йогурт Греческий натуральный 2%, 140 г

Акция действует 30/04—06/05

АКЦИЯ&nbsp30/04—06/05

Молочный коктейль Чудо клубника-ваниль; шоколад; банан-карамель; белый шоколад; молочный шоколад 2-3%, 200 мл

Молочная гастрономия

Молочный коктейль Чудо клубника-ваниль; шоколад; банан-карамель; белый шоколад; молочный шоколад 2-3%, 200 мл

Акция действует 30/04—06/05

АКЦИЯ&nbsp30/04—06/05

Сырок творожный глазированный Свитлогорье ваниль 26%, 50 г

Молочная гастрономия

Сырок творожный глазированный Свитлогорье ваниль 26%, 50 г

Акция действует 30/04—06/05

АКЦИЯ&nbsp30/04—06/05

Десерт Zott Monte с шоколадом и лесным орехом 13,3%, 55 г

Молочная гастрономия

Десерт Zott Monte с шоколадом и лесным орехом 13,3%, 55 г

Акция действует 30/04—06/05

АКЦИЯ&nbsp30/04—06/05

Сырок глазированный Советские традиции с вареной сгущенкой 26%, 45 г

Молочная гастрономия

Сырок глазированный Советские традиции с вареной сгущенкой 26%, 45 г

Акция действует 30/04—06/05

АКЦИЯ&nbsp30/04—06/05

Творог Растишка клубника-банан-пломбир; клубника-абрикос 3,5%, 270 г

Молочная гастрономия

Творог Растишка клубника-банан-пломбир; клубника-абрикос 3,5%, 270 г

Акция действует 30/04—06/05

АКЦИЯ&nbsp30/04—06/05

Биойогурт Активиа термостатный черника; персик-льняные семена; клубника-злаковый микс; гранола микс 2,4-3%, 170 г

Молочная гастрономия

Биойогурт Активиа термостатный черника; персик-льняные семена; клубника-злаковый микс; гранола микс 2,4-3%, 170 г

Акция действует 30/04—06/05

АКЦИЯ&nbsp30/04—06/05

Биопродукт Активиа творожно-йогуртный инжир-курага-чернослив; малина; натуральный; банан-овсянка; черника-овсянка 4-4,5%, 130 г

Молочная гастрономия

Биопродукт Активиа творожно-йогуртный инжир-курага-чернослив; малина; натуральный; банан-овсянка; черника-овсянка 4-4,5%, 130 г

Акция действует 30/04—06/05

АКЦИЯ&nbsp30/04—06/05

Напиток Актуаль сыворотка+сок апельсин-манго; персик-маракуйя, 310/330 г

Молочная гастрономия

Напиток Актуаль сыворотка+сок апельсин-манго; персик-маракуйя, 310/330 г

Акция действует 30/04—06/05

АКЦИЯ&nbsp30/04—06/05

Ряженка Д Романов луг 4%, 420 г

Молочная гастрономия

Ряженка Д Романов луг 4%, 420 г

Акция действует 30/04—06/05

АКЦИЯ&nbsp30/04—06/05

Сметана Простоквашино 15%, 180 г

Молочная гастрономия

Сметана Простоквашино 15%, 180 г

Акция действует 30/04—06/05

Все предложения

dixy.ru

Action Controller: Exception caught

RSolr::Error::Http - 404 Not Found Error: NOT_FOUND URI: http://78.46.105.244:8902/solr-production-ru/select?wt=ruby Request Headers: {"Content-Type"=>"application/x-www-form-urlencoded; charset=UTF-8"} Request Data: "fq=type%3ACatalogLocation&fq=valid_from_ds%3A%7B*+TO+2018%5C-05%5C-04T00%5C%3A00%5C%3A00Z%7D&fq=valid_until_ds%3A%7B2018%5C-05%5C-04T00%5C%3A00%5C%3A00Z+TO+*%7D&fq=e_shop_bs%3Atrue+OR+_query_%3A%22%7B%21geofilt+pt%3D56.8369540889%2C60.6013865503+sfield%3Dlat_lon_gs+d%3D50%7D%22&sort=position_i+asc%2C+score+asc&q=%D0%9C%D0%BE%D0%BB%D0%BE%D0%BA%D0%BE&fl=*+score&qf=title_text+tags_texts&defType=edismax&start=0&rows=0&facet=true&f.catalog_id_is.facet.limit=200&f.catalog_id_is.facet.mincount=1&facet.field=catalog_id_is" Backtrace: /home/webistrano/.new_sp_bundle/ruby/2.2.0/gems/rsolr-1.1.2/lib/rsolr/client.rb:288:in `adapt_response' /home/webistrano/.new_sp_bundle/ruby/2.2.0/gems/rsolr-1.1.2/lib/rsolr/client.rb:189:in `execute' /home/webistrano/.new_sp_bundle/ruby/2.2.0/gems/rsolr-1.1.2/lib/rsolr/client.rb:175:in `send_and_receive' /home/webistrano/.new_sp_bundle/ruby/2.2.0/gems/sunspot_rails-2.2.7/lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation' /home/webistrano/.new_sp_bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `block in instrument' /home/webistrano/.new_sp_bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /home/webistrano/.new_sp_bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `instrument' /home/webistrano/.new_sp_bundle/ruby/2.2.0/gems/sunspot_rails-2.2.7/lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation' (eval):2:in `post' /home/webistrano/.new_sp_bundle/ruby/2.2.0/gems/sunspot-2.2.7/lib/sunspot/search/abstract_search.rb:49:in `execute' /home/webistrano/.new_sp_bundle/ruby/2.2.0/gems/sunspot-2.2.7/lib/sunspot/session.rb:59:in `search'

Extracted source (around line #288):

286 287 288 289 290 291

raise "The response does not have the correct keys => :body, :headers, :status" unless

%W(body headers status) == response.keys.map{|k|k.to_s}.sort

raise RSolr::Error::Http.new request, response unless [200,302].include? response[:status]

result = if respond_to? "evaluate_#{request[:params][:wt]}_response", true

send "evaluate_#{request[:params][:wt]}_response", request, response

Extracted source (around line #189):

187 188 189 190 191 192

end

adapt_response(request_context, raw_response) unless raw_response.nil?

end

def retry_503?(request_context, response)

Extracted source (around line #175):

173 174 175 176 177 178

def send_and_receive path, opts

request_context = build_request path, opts

execute request_context

end

#

Extracted source (around line #16):

14 15 16 17 18 19

payload = {:path => path, :parameters => parameters}

ActiveSupport::Notifications.instrument("request.rsolr", payload) do

send_and_receive_without_as_instrumentation(path, opts)

end

end

end

Extracted source (around line #164):

162 163 164 165 166 167

def instrument(name, payload = {})

if notifier.listening?(name)

instrumenter.instrument(name, payload) { yield payload if block_given? }

else

yield payload if block_given?

end

Extracted source (around line #20):

18 19 20 21 22 23

start name, payload

begin

yield payload

rescue Exception => e

payload[:exception] = [e.class.name, e.message]

raise e

Extracted source (around line #164):

162 163 164 165 166 167

def instrument(name, payload = {})

if notifier.listening?(name)

instrumenter.instrument(name, payload) { yield payload if block_given? }

else

yield payload if block_given?

end

Extracted source (around line #15):

13 14 15 16 17 18

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

Extracted source (around line #49):

47 48 49 50 51 52

reset

params = @query.to_params

@solr_result = @connection.post "#{request_handler}", :data => params

self

end

Extracted source (around line #59):

57 58 59 60 61 62

def search(*types, &block)

search = new_search(*types, &block)

search.execute

end

#

Extracted source (around line #11):

9 10 11 12 13 14

module_eval(<<-RUBY, __FILE__, __LINE__ + 1)

def #{method}(*args, &block)

#{delegate}.#{method}(*args, &block)

end

RUBY

end

Extracted source (around line #383):

381 382 383 384 385 386

#

def search(*types, &block)

session.search(*types, &block)

end

def new_more_like_this(object, *types, &block)

Extracted source (around line #364):

362 363 364 365 366 367

alias_method method_name, _traced_method_name(method_name, metric_name_code)

send visibility, method_name

send visibility, _traced_method_name(method_name, metric_name_code)

::NewRelic::Agent.logger.debug("Traced method: class = #{derived_class_name},"+

"method = #{method_name}, "+

"metric = '#{metric_name_code}'")

Extracted source (around line #81):

79 80 81 82 83 84

begin

yield

ensure

segment.finish

end

Extracted source (around line #362):

360 361 362 363 364 365

class_eval traced_method, __FILE__, __LINE__

alias_method _untraced_method_name(method_name, metric_name_code), method_name

alias_method method_name, _traced_method_name(method_name, metric_name_code)

send visibility, method_name

send visibility, _traced_method_name(method_name, metric_name_code)

::NewRelic::Agent.logger.debug("Traced method: class = #{derived_class_name},"+

Extracted source (around line #287):

285 286 287 288 289 290

def search(term, options = {})

catalogs = Sunspot.search(CatalogLocation) do

with(:valid_from).less_than Date.today

with(:valid_until).greater_than Date.today

Extracted source (around line #29):

27 28 29 30 31 32

term_search = (defined?(@product) && [email protected]?) ? @product.title : @search_term

@catalogs = Catalog.search(term_search, opts)

searched_pages = Page.search(term_search, opts).compact rescue []

Extracted source (around line #4):

2 3 4 5 6 7

module ImplicitRender

def send_action(method, *args)

ret = super

default_render unless performed?

ret

end

Extracted source (around line #198):

196 197 198 199 200 201

# which is *not* necessarily the same as the action name.

def process_action(method_name, *args)

send_action(method_name, *args)

end

# Actually call the method associated with the action. Override

Extracted source (around line #10):

8 9 10 11 12 13

def process_action(*) #:nodoc:

self.formats = request.formats.map(&:ref).compact

super

end

# Check for double render errors and set the content_type after rendering.

Extracted source (around line #20):

18 19 20 21 22 23

def process_action(*args)

run_callbacks(:process_action) do

super

end

end

Extracted source (around line #117):

115 116 117 118 119 120

def call(env)

block = env.run_block

env.value = !env.halted && (!block || block.call)

env

end

end

Extracted source (around line #117):

115 116 117 118 119 120

def call(env)

block = env.run_block

env.value = !env.halted && (!block || block.call)

env

end

end

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #234):

232 233 234 235 236 237

def self.halting(next_callback, user_callback)

lambda { |env|

env = next_callback.call env

unless env.halted

user_callback.call env.target, env.value

end

Extracted source (around line #234):

232 233 234 235 236 237

def self.halting(next_callback, user_callback)

lambda { |env|

env = next_callback.call env

unless env.halted

user_callback.call env.target, env.value

end

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #234):

232 233 234 235 236 237

def self.halting(next_callback, user_callback)

lambda { |env|

env = next_callback.call env

unless env.halted

user_callback.call env.target, env.value

end

Extracted source (around line #234):

232 233 234 235 236 237

def self.halting(next_callback, user_callback)

lambda { |env|

env = next_callback.call env

unless env.halted

user_callback.call env.target, env.value

end

Extracted source (around line #234):

232 233 234 235 236 237

def self.halting(next_callback, user_callback)

lambda { |env|

env = next_callback.call env

unless env.halted

user_callback.call env.target, env.value

end

Extracted source (around line #234):

232 233 234 235 236 237

def self.halting(next_callback, user_callback)

lambda { |env|

env = next_callback.call env

unless env.halted

user_callback.call env.target, env.value

end

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #308):

306 307 308 309 310 311

else

user_callback.call(target, value) {

env = next_callback.call env

env.value

}

env

Extracted source (around line #308):

306 307 308 309 310 311

else

user_callback.call(target, value) {

env = next_callback.call env

env.value

}

env

Extracted source (around line #27):

25 26 27 28 29 30

end

yield

ensure

I18n.default_locale = current_default_locale if tmp_default_locale

Extracted source (around line #427):

425 426 427 428 429 430

case filter

when Symbol

lambda { |target, _, &blk| target.send filter, &blk }

when String

l = eval "lambda { |value| #{filter} }"

lambda { |target, value| target.instance_exec(value, &l) }

Extracted source (around line #307):

305 306 307 308 309 310

next_callback.call env

else

user_callback.call(target, value) {

env = next_callback.call env

env.value

}

Extracted source (around line #307):

305 306 307 308 309 310

next_callback.call env

else

user_callback.call(target, value) {

env = next_callback.call env

env.value

}

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #92):

90 91 92 93 94 95

runner = callbacks.compile

e = Filters::Environment.new(self, false, nil, block)

runner.call(e).value

end

end

Extracted source (around line #92):

90 91 92 93 94 95

runner = callbacks.compile

e = Filters::Environment.new(self, false, nil, block)

runner.call(e).value

end

end

Extracted source (around line #734):

732 733 734 735 736 737

module_eval <<-RUBY, __FILE__, __LINE__ + 1

def _run_#{name}_callbacks(&block)

_run_callbacks(_#{name}_callbacks, &block)

end

RUBY

end

Extracted source (around line #81):

79 80 81 82 83 84

# end

def run_callbacks(kind, &block)

send "_run_#{kind}_callbacks", &block

end

private

Extracted source (around line #19):

17 18 19 20 21 22

# process_action callbacks around the normal behavior.

def process_action(*args)

run_callbacks(:process_action) do

super

end

end

Extracted source (around line #29):

27 28 29 30 31 32

private

def process_action(*args)

super

rescue Exception => exception

request.env['action_dispatch.show_detailed_exceptions'] ||= show_detailed_exceptions?

rescue_with_handler(exception) || raise(exception)

Extracted source (around line #31):

29 30 31 32 33 34

ActiveSupport::Notifications.instrument("process_action.action_controller", raw_payload) do |payload|

result = super

payload[:status] = response.status

append_info_to_payload(payload)

result

Extracted source (around line #164):

162 163 164 165 166 167

def instrument(name, payload = {})

if notifier.listening?(name)

instrumenter.instrument(name, payload) { yield payload if block_given? }

else

yield payload if block_given?

end

Extracted source (around line #20):

18 19 20 21 22 23

start name, payload

begin

yield payload

rescue Exception => e

payload[:exception] = [e.class.name, e.message]

raise e

Extracted source (around line #164):

162 163 164 165 166 167

def instrument(name, payload = {})

if notifier.listening?(name)

instrumenter.instrument(name, payload) { yield payload if block_given? }

else

yield payload if block_given?

end

Extracted source (around line #30):

28 29 30 31 32 33

ActiveSupport::Notifications.instrument("start_processing.action_controller", raw_payload.dup)

ActiveSupport::Notifications.instrument("process_action.action_controller", raw_payload) do |payload|

result = super

payload[:status] = response.status

append_info_to_payload(payload)

Extracted source (around line #250):

248 249 250 251 252 253

request.filtered_parameters.merge! wrapped_filtered_hash

end

super

end

private

Extracted source (around line #18):

16 17 18 19 20 21

# and it won't be cleaned up by the method below.

ActiveRecord::LogSubscriber.reset_runtime

super

end

def cleanup_view_runtime

Extracted source (around line #137):

135 136 137 138 139 140

@_response_body = nil

process_action(action_name, *args)

end

# Delegates to the class' #controller_path

Extracted source (around line #30):

28 29 30 31 32 33

def process(*) #:nodoc:

old_config, I18n.config = I18n.config, I18nProxy.new(I18n.config, lookup_context)

super

ensure

I18n.config = old_config

end

Extracted source (around line #195):

193 194 195 196 197 198

@_env = request.env

@_env['action_controller.instance'] = self

process(name)

to_a

end

Extracted source (around line #13):

11 12 13 14 15 16

def dispatch(action, request)

set_response!(request)

super(action, request)

end

def response_body=(body)

Extracted source (around line #236):

234 235 236 237 238 239

end

else

lambda { |env| new.dispatch(name, klass.new(env)) }

end

end

Extracted source (around line #73):

71 72 73 74 75 76

def dispatch(controller, action, env)

controller.action(action).call(env)

end

def normalize_controller!(params)

Extracted source (around line #73):

71 72 73 74 75 76

def dispatch(controller, action, env)

controller.action(action).call(env)

end

def normalize_controller!(params)

Extracted source (around line #42):

40 41 42 43 44 45

end

dispatch(controller, params[:action], req.env)

end

def prepare_params!(params)

Extracted source (around line #43):

41 42 43 44 45 46

req.path_parameters = set_params.merge parameters

status, headers, body = route.app.serve(req)

if 'pass' == headers['X-Cascade']

req.script_name = script_name

Extracted source (around line #30):

28 29 30 31 32 33

def serve(req)

find_routes(req).each do |match, parameters, route|

set_params = req.path_parameters

path_info = req.path_info

script_name = req.script_name

Extracted source (around line #30):

28 29 30 31 32 33

def serve(req)

find_routes(req).each do |match, parameters, route|

set_params = req.path_parameters

path_info = req.path_info

script_name = req.script_name

Extracted source (around line #802):

800 801 802 803 804 805

req = request_class.new(env)

req.path_info = Journey::Router::Utils.normalize_path(req.path_info)

@router.serve(req)

end

def recognize_path(path, environment = {})

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #30):

28 29 30 31 32 33

def traced_call(env)

@app.call(env)

end

end

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #32):

30 31 32 33 34 35

def traced_call(env)

result = @app.call(env) # [status, headers, response]

js_to_inject = NewRelic::Agent.browser_timing_header

if (js_to_inject != "") && should_instrument?(env, result[0], result[1])

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #164):

162 163 164 165 166 167

end

@app.call(env)

end

# Checks to see if any redirect options were passed in

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #54):

52 53 54 55 56 57

@check_after = Time.now.to_f + @dwell if @dwell

end

@app.call(env)

end

end

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #14):

12 13 14 15 16 17

#p "-" * 100

#p env.inspect

@app.call(env)

end

end

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #35):

33 34 35 36 37 38

env['warden'] = Proxy.new(env, self)

result = catch(:warden) do

@app.call(env)

end

result ||= {}

Extracted source (around line #34):

32 33 34 35 36 37

env['warden'] = Proxy.new(env, self)

result = catch(:warden) do

@app.call(env)

end

Extracted source (around line #34):

32 33 34 35 36 37

env['warden'] = Proxy.new(env, self)

result = catch(:warden) do

@app.call(env)

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #24):

22 23 24 25 26 27

def call(env)

status, headers, body = @app.call(env)

if etag_status?(status) && etag_body?(body) && !skip_caching?(headers)

original_body = body

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #25):

23 24 25 26 27 28

case env[REQUEST_METHOD]

when "GET", "HEAD"

status, headers, body = @app.call(env)

headers = Utils::HeaderHash.new(headers)

if status == 200 && fresh?(env, headers)

status = 304

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #13):

11 12 13 14 15 16

def call(env)

status, headers, body = @app.call(env)

if env[REQUEST_METHOD] == HEAD

[

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #27):

25 26 27 28 29 30

end

@app.call(env)

end

private

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #260):

258 259 260 261 262 263

def call(env)

@app.call(env)

ensure

session = Request::Session.find(env) || {}

flash_hash = env[KEY]

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #225):

223 224 225 226 227 228

def context(env, [email protected])

prepare_session(env)

status, headers, body = app.call(env)

commit_session(env, status, headers, body)

end

Extracted source (around line #220):

218 219 220 221 222 223

def call(env)

context(env)

end

def context(env, [email protected])

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #560):

558 559 560 561 562 563

def call(env)

status, headers, body = @app.call(env)

if cookie_jar = env['action_dispatch.cookies']

unless cookie_jar.committed?

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #36):

34 35 36 37 38 39

connection.enable_query_cache!

response = @app.call(env)

response[2] = Rack::BodyProxy.new(response[2]) do

restore_query_cache_settings(connection_id, enabled)

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #23):

21 22 23 24 25 26

# rubocop:disable Lint/RescueException

begin

response = @app.call(env)

rescue Exception => ex

notify_airbrake(ex, env)

raise ex

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #647):

645 646 647 648 649 650

testing = env['rack.test']

response = @app.call(env)

response[2] = ::Rack::BodyProxy.new(response[2]) do

ActiveRecord::Base.clear_active_connections! unless testing

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #29):

27 28 29 30 31 32

result = run_callbacks :call do

begin

@app.call(env)

rescue => error

end

end

Extracted source (around line #88):

86 87 88 89 90 91

def _run_callbacks(callbacks, &block)

if callbacks.empty?

block.call if block

else

runner = callbacks.compile

e = Filters::Environment.new(self, false, nil, block)

Extracted source (around line #88):

86 87 88 89 90 91

def _run_callbacks(callbacks, &block)

if callbacks.empty?

block.call if block

else

runner = callbacks.compile

e = Filters::Environment.new(self, false, nil, block)

Extracted source (around line #734):

732 733 734 735 736 737

module_eval <<-RUBY, __FILE__, __LINE__ + 1

def _run_#{name}_callbacks(&block)

_run_callbacks(_#{name}_callbacks, &block)

end

RUBY

end

Extracted source (around line #81):

79 80 81 82 83 84

# end

def run_callbacks(kind, &block)

send "_run_#{kind}_callbacks", &block

end

private

Extracted source (around line #27):

25 26 27 28 29 30

def call(env)

error = nil

result = run_callbacks :call do

begin

@app.call(env)

rescue => error

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #78):

76 77 78 79 80 81

def call(env)

env["action_dispatch.remote_ip"] = GetIp.new(env, self)

@app.call(env)

end

# The GetIp class exists as a way to defer processing of the request data

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #58):

56 57 58 59 60 61

better_errors_call env

else

@app.call env

end

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #17):

15 16 17 18 19 20

def call(env)

_, headers, body = response = @app.call(env)

if headers['X-Cascade'] == 'pass'

body.close if body.respond_to?(:close)

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #30):

28 29 30 31 32 33

def call(env)

@app.call(env)

rescue Exception => exception

if env['action_dispatch.show_exceptions'] == false

raise exception

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #38):

36 37 38 39 40 41

instrumenter.start 'request.action_dispatch', request: request

logger.info { started_request_message(request) }

resp = @app.call(env)

resp[2] = ::Rack::BodyProxy.new(resp[2]) { finish(request) }

resp

rescue Exception

Extracted source (around line #20):

18 19 20 21 22 23

if logger.respond_to?(:tagged)

logger.tagged(compute_tags(request)) { call_app(request, env) }

else

call_app(request, env)

end

Extracted source (around line #68):

66 67 68 69 70 71

def tagged(*tags)

formatter.tagged(*tags) { yield self }

end

def flush

Extracted source (around line #26):

24 25 26 27 28 29

def tagged(*tags)

new_tags = push_tags(*tags)

yield self

ensure

pop_tags(new_tags.size)

end

Extracted source (around line #68):

66 67 68 69 70 71

def tagged(*tags)

formatter.tagged(*tags) { yield self }

end

def flush

Extracted source (around line #20):

18 19 20 21 22 23

if logger.respond_to?(:tagged)

logger.tagged(compute_tags(request)) { call_app(request, env) }

else

call_app(request, env)

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #9):

7 8 9 10 11 12

def call(env)

RequestStore.begin!

@app.call(env)

ensure

RequestStore.end!

RequestStore.clear!

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #21):

19 20 21 22 23 24

def call(env)

env["action_dispatch.request_id"] = external_request_id(env) || internal_request_id

@app.call(env).tap { |_status, headers, _body| headers["X-Request-Id"] = env["action_dispatch.request_id"] }

end

private

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #22):

20 21 22 23 24 25

end

@app.call(env)

end

def method_override(env)

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #18):

16 17 18 19 20 21

def call(env)

start_time = clock_time

status, headers, body = @app.call(env)

request_time = clock_time - start_time

if !headers.has_key?(@header_name)

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #28):

26 27 28 29 30 31

def call(env)

LocalCacheRegistry.set_cache_for(local_cache_key, LocalStore.new)

response = @app.call(env)

response[2] = ::Rack::BodyProxy.new(response[2]) do

LocalCacheRegistry.set_cache_for(local_cache_key, nil)

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #17):

15 16 17 18 19 20

old, env[FLAG] = env[FLAG], false

@mutex.lock

response = @app.call(env)

body = BodyProxy.new(response[2]) { @mutex.unlock }

response[2] = body

response

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #113):

111 112 113 114 115 116

end

@app.call(env)

end

end

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #113):

111 112 113 114 115 116

def call(env)

status, headers, body = @app.call(env)

if body.respond_to?(:to_path)

case type = variation(env)

when 'X-Accel-Redirect'

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #518):

516 517 518 519 520 521

env["ROUTES_#{routes.object_id}_SCRIPT_NAME"] = env['SCRIPT_NAME'].dup

end

app.call(env)

end

# Defines additional Rack env configuration that is added on each call.

Extracted source (around line #164):

162 163 164 165 166 167

env["ORIGINAL_FULLPATH"] = build_original_fullpath(env)

env["ORIGINAL_SCRIPT_NAME"] = env["SCRIPT_NAME"]

super(env)

end

# Reload application routes regardless if they changed or not.

Extracted source (around line #194):

192 193 194 195 196 197

def method_missing(name, *args, &block)

if instance.respond_to?(name)

instance.public_send(name, *args, &block)

else

super

end

Extracted source (around line #194):

192 193 194 195 196 197

def method_missing(name, *args, &block)

if instance.respond_to?(name)

instance.public_send(name, *args, &block)

else

super

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #66):

64 65 66 67 68 69

env['PATH_INFO'] = rest

return app.call(env)

end

[404, {CONTENT_TYPE => "text/plain", "X-Cascade" => "pass"}, ["Not Found: #{path}"]]

Extracted source (around line #50):

48 49 50 51 52 53

sPort = env['SERVER_PORT']

@mapping.each do |host, location, match, app|

unless casecmp?(hHost, host) \

|| casecmp?(sName, host) \

|| (!host && (casecmp?(hHost, sName) ||

Extracted source (around line #50):

48 49 50 51 52 53

sPort = env['SERVER_PORT']

@mapping.each do |host, location, match, app|

unless casecmp?(hHost, host) \

|| casecmp?(sName, host) \

|| (!host && (casecmp?(hHost, sName) ||

Extracted source (around line #94):

92 93 94 95 96 97

begin

status, headers, body = @app.call(env)

rescue => e

if !should_swallow_app_error?(e, socket_wrapper)

# It's a good idea to catch application exceptions here because

Extracted source (around line #149):

147 148 149 150 151 152

begin

if headers[REQUEST_METHOD] == GET

process_request(headers, connection, socket_wrapper, @protocol == :http)

elsif headers[REQUEST_METHOD] == PING

process_ping(headers, connection)

false

Extracted source (around line #110):

108 109 110 111 112 113

finish_callback.call

while true

hijacked = accept_and_process_next_request(socket_wrapper, channel, buffer)

socket_wrapper = Utils::UnseekableSocket.new if hijacked

end

rescue Interrupted

Extracted source (around line #415):

413 414 415 416 417 418

handler = thread_handler.new(self, main_socket_options)

handler.install

handler.main_loop(set_initialization_state_to_true)

ensure

set_initialization_state.call(false)

unregister_current_thread

Extracted source (around line #111):

109 110 111 112 113 114

Thread.current.abort_on_exception = true

begin

yield(*args)

rescue SystemExit

raise

rescue Exception => e

Rails.root: /home/webistrano/sp/ru/production/current

Request

Parameters:

{"city"=>"ekaterinburg", "search_term"=>"молоко"} lat: #<BigDecimal:7f8402fc8950,'0.5683695408 89E2',27(27)> layout_name: "application" lng: #<BigDecimal:7f8402fc88d8,'0.6060138655 03E2',27(27)> user_address: "Екатеринбург" HTTP_ACCEPT: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" HTTP_ACCEPT_CHARSET: "windows-1251,utf-8;q=0.7,*;q=0.7" HTTP_ACCEPT_ENCODING: "identity" HTTP_ACCEPT_LANGUAGE: "en-US,en;q=0.5" HTTP_CACHE_CONTROL: "no-cache" REMOTE_ADDR: "194.67.209.252" SERVER_NAME: "www.shoppingplus.ru" SERVER_PROTOCOL: "HTTP/1.1"

Response

Headers:

None

www.shoppingplus.ru

Action Controller: Exception caught

RSolr::Error::Http - 404 Not Found Error: NOT_FOUND URI: http://78.46.105.244:8902/solr-production-ru/select?wt=ruby Request Headers: {"Content-Type"=>"application/x-www-form-urlencoded; charset=UTF-8"} Request Data: "fq=type%3ACatalogLocation&fq=valid_from_ds%3A%7B*+TO+2018%5C-05%5C-04T00%5C%3A00%5C%3A00Z%7D&fq=valid_until_ds%3A%7B2018%5C-05%5C-04T00%5C%3A00%5C%3A00Z+TO+*%7D&fq=e_shop_bs%3Atrue+OR+_query_%3A%22%7B%21geofilt+pt%3D54.3833333%2C37.1166667+sfield%3Dlat_lon_gs+d%3D50%7D%22&sort=position_i+asc%2C+score+asc&q=%D0%9C%D0%BE%D0%BB%D0%BE%D0%BA%D0%BE&fl=*+score&qf=title_text+tags_texts&defType=edismax&start=0&rows=0&facet=true&f.catalog_id_is.facet.limit=200&f.catalog_id_is.facet.mincount=1&facet.field=catalog_id_is" Backtrace: /home/webistrano/.new_sp_bundle/ruby/2.2.0/gems/rsolr-1.1.2/lib/rsolr/client.rb:288:in `adapt_response' /home/webistrano/.new_sp_bundle/ruby/2.2.0/gems/rsolr-1.1.2/lib/rsolr/client.rb:189:in `execute' /home/webistrano/.new_sp_bundle/ruby/2.2.0/gems/rsolr-1.1.2/lib/rsolr/client.rb:175:in `send_and_receive' /home/webistrano/.new_sp_bundle/ruby/2.2.0/gems/sunspot_rails-2.2.7/lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation' /home/webistrano/.new_sp_bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `block in instrument' /home/webistrano/.new_sp_bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /home/webistrano/.new_sp_bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `instrument' /home/webistrano/.new_sp_bundle/ruby/2.2.0/gems/sunspot_rails-2.2.7/lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation' (eval):2:in `post' /home/webistrano/.new_sp_bundle/ruby/2.2.0/gems/sunspot-2.2.7/lib/sunspot/search/abstract_search.rb:49:in `execute' /home/webistrano/.new_sp_bundle/ruby/2.2.0/gems/sunspot-2.2.7/lib/sunspot/session.rb:59:in `search'

Extracted source (around line #288):

286 287 288 289 290 291

raise "The response does not have the correct keys => :body, :headers, :status" unless

%W(body headers status) == response.keys.map{|k|k.to_s}.sort

raise RSolr::Error::Http.new request, response unless [200,302].include? response[:status]

result = if respond_to? "evaluate_#{request[:params][:wt]}_response", true

send "evaluate_#{request[:params][:wt]}_response", request, response

Extracted source (around line #189):

187 188 189 190 191 192

end

adapt_response(request_context, raw_response) unless raw_response.nil?

end

def retry_503?(request_context, response)

Extracted source (around line #175):

173 174 175 176 177 178

def send_and_receive path, opts

request_context = build_request path, opts

execute request_context

end

#

Extracted source (around line #16):

14 15 16 17 18 19

payload = {:path => path, :parameters => parameters}

ActiveSupport::Notifications.instrument("request.rsolr", payload) do

send_and_receive_without_as_instrumentation(path, opts)

end

end

end

Extracted source (around line #164):

162 163 164 165 166 167

def instrument(name, payload = {})

if notifier.listening?(name)

instrumenter.instrument(name, payload) { yield payload if block_given? }

else

yield payload if block_given?

end

Extracted source (around line #20):

18 19 20 21 22 23

start name, payload

begin

yield payload

rescue Exception => e

payload[:exception] = [e.class.name, e.message]

raise e

Extracted source (around line #164):

162 163 164 165 166 167

def instrument(name, payload = {})

if notifier.listening?(name)

instrumenter.instrument(name, payload) { yield payload if block_given? }

else

yield payload if block_given?

end

Extracted source (around line #15):

13 14 15 16 17 18

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

Extracted source (around line #49):

47 48 49 50 51 52

reset

params = @query.to_params

@solr_result = @connection.post "#{request_handler}", :data => params

self

end

Extracted source (around line #59):

57 58 59 60 61 62

def search(*types, &block)

search = new_search(*types, &block)

search.execute

end

#

Extracted source (around line #11):

9 10 11 12 13 14

module_eval(<<-RUBY, __FILE__, __LINE__ + 1)

def #{method}(*args, &block)

#{delegate}.#{method}(*args, &block)

end

RUBY

end

Extracted source (around line #383):

381 382 383 384 385 386

#

def search(*types, &block)

session.search(*types, &block)

end

def new_more_like_this(object, *types, &block)

Extracted source (around line #364):

362 363 364 365 366 367

alias_method method_name, _traced_method_name(method_name, metric_name_code)

send visibility, method_name

send visibility, _traced_method_name(method_name, metric_name_code)

::NewRelic::Agent.logger.debug("Traced method: class = #{derived_class_name},"+

"method = #{method_name}, "+

"metric = '#{metric_name_code}'")

Extracted source (around line #81):

79 80 81 82 83 84

begin

yield

ensure

segment.finish

end

Extracted source (around line #362):

360 361 362 363 364 365

class_eval traced_method, __FILE__, __LINE__

alias_method _untraced_method_name(method_name, metric_name_code), method_name

alias_method method_name, _traced_method_name(method_name, metric_name_code)

send visibility, method_name

send visibility, _traced_method_name(method_name, metric_name_code)

::NewRelic::Agent.logger.debug("Traced method: class = #{derived_class_name},"+

Extracted source (around line #287):

285 286 287 288 289 290

def search(term, options = {})

catalogs = Sunspot.search(CatalogLocation) do

with(:valid_from).less_than Date.today

with(:valid_until).greater_than Date.today

Extracted source (around line #29):

27 28 29 30 31 32

term_search = (defined?(@product) && [email protected]?) ? @product.title : @search_term

@catalogs = Catalog.search(term_search, opts)

searched_pages = Page.search(term_search, opts).compact rescue []

Extracted source (around line #4):

2 3 4 5 6 7

module ImplicitRender

def send_action(method, *args)

ret = super

default_render unless performed?

ret

end

Extracted source (around line #198):

196 197 198 199 200 201

# which is *not* necessarily the same as the action name.

def process_action(method_name, *args)

send_action(method_name, *args)

end

# Actually call the method associated with the action. Override

Extracted source (around line #10):

8 9 10 11 12 13

def process_action(*) #:nodoc:

self.formats = request.formats.map(&:ref).compact

super

end

# Check for double render errors and set the content_type after rendering.

Extracted source (around line #20):

18 19 20 21 22 23

def process_action(*args)

run_callbacks(:process_action) do

super

end

end

Extracted source (around line #117):

115 116 117 118 119 120

def call(env)

block = env.run_block

env.value = !env.halted && (!block || block.call)

env

end

end

Extracted source (around line #117):

115 116 117 118 119 120

def call(env)

block = env.run_block

env.value = !env.halted && (!block || block.call)

env

end

end

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #234):

232 233 234 235 236 237

def self.halting(next_callback, user_callback)

lambda { |env|

env = next_callback.call env

unless env.halted

user_callback.call env.target, env.value

end

Extracted source (around line #234):

232 233 234 235 236 237

def self.halting(next_callback, user_callback)

lambda { |env|

env = next_callback.call env

unless env.halted

user_callback.call env.target, env.value

end

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #234):

232 233 234 235 236 237

def self.halting(next_callback, user_callback)

lambda { |env|

env = next_callback.call env

unless env.halted

user_callback.call env.target, env.value

end

Extracted source (around line #234):

232 233 234 235 236 237

def self.halting(next_callback, user_callback)

lambda { |env|

env = next_callback.call env

unless env.halted

user_callback.call env.target, env.value

end

Extracted source (around line #234):

232 233 234 235 236 237

def self.halting(next_callback, user_callback)

lambda { |env|

env = next_callback.call env

unless env.halted

user_callback.call env.target, env.value

end

Extracted source (around line #234):

232 233 234 235 236 237

def self.halting(next_callback, user_callback)

lambda { |env|

env = next_callback.call env

unless env.halted

user_callback.call env.target, env.value

end

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #308):

306 307 308 309 310 311

else

user_callback.call(target, value) {

env = next_callback.call env

env.value

}

env

Extracted source (around line #308):

306 307 308 309 310 311

else

user_callback.call(target, value) {

env = next_callback.call env

env.value

}

env

Extracted source (around line #27):

25 26 27 28 29 30

end

yield

ensure

I18n.default_locale = current_default_locale if tmp_default_locale

Extracted source (around line #427):

425 426 427 428 429 430

case filter

when Symbol

lambda { |target, _, &blk| target.send filter, &blk }

when String

l = eval "lambda { |value| #{filter} }"

lambda { |target, value| target.instance_exec(value, &l) }

Extracted source (around line #307):

305 306 307 308 309 310

next_callback.call env

else

user_callback.call(target, value) {

env = next_callback.call env

env.value

}

Extracted source (around line #307):

305 306 307 308 309 310

next_callback.call env

else

user_callback.call(target, value) {

env = next_callback.call env

env.value

}

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #92):

90 91 92 93 94 95

runner = callbacks.compile

e = Filters::Environment.new(self, false, nil, block)

runner.call(e).value

end

end

Extracted source (around line #92):

90 91 92 93 94 95

runner = callbacks.compile

e = Filters::Environment.new(self, false, nil, block)

runner.call(e).value

end

end

Extracted source (around line #734):

732 733 734 735 736 737

module_eval <<-RUBY, __FILE__, __LINE__ + 1

def _run_#{name}_callbacks(&block)

_run_callbacks(_#{name}_callbacks, &block)

end

RUBY

end

Extracted source (around line #81):

79 80 81 82 83 84

# end

def run_callbacks(kind, &block)

send "_run_#{kind}_callbacks", &block

end

private

Extracted source (around line #19):

17 18 19 20 21 22

# process_action callbacks around the normal behavior.

def process_action(*args)

run_callbacks(:process_action) do

super

end

end

Extracted source (around line #29):

27 28 29 30 31 32

private

def process_action(*args)

super

rescue Exception => exception

request.env['action_dispatch.show_detailed_exceptions'] ||= show_detailed_exceptions?

rescue_with_handler(exception) || raise(exception)

Extracted source (around line #31):

29 30 31 32 33 34

ActiveSupport::Notifications.instrument("process_action.action_controller", raw_payload) do |payload|

result = super

payload[:status] = response.status

append_info_to_payload(payload)

result

Extracted source (around line #164):

162 163 164 165 166 167

def instrument(name, payload = {})

if notifier.listening?(name)

instrumenter.instrument(name, payload) { yield payload if block_given? }

else

yield payload if block_given?

end

Extracted source (around line #20):

18 19 20 21 22 23

start name, payload

begin

yield payload

rescue Exception => e

payload[:exception] = [e.class.name, e.message]

raise e

Extracted source (around line #164):

162 163 164 165 166 167

def instrument(name, payload = {})

if notifier.listening?(name)

instrumenter.instrument(name, payload) { yield payload if block_given? }

else

yield payload if block_given?

end

Extracted source (around line #30):

28 29 30 31 32 33

ActiveSupport::Notifications.instrument("start_processing.action_controller", raw_payload.dup)

ActiveSupport::Notifications.instrument("process_action.action_controller", raw_payload) do |payload|

result = super

payload[:status] = response.status

append_info_to_payload(payload)

Extracted source (around line #250):

248 249 250 251 252 253

request.filtered_parameters.merge! wrapped_filtered_hash

end

super

end

private

Extracted source (around line #18):

16 17 18 19 20 21

# and it won't be cleaned up by the method below.

ActiveRecord::LogSubscriber.reset_runtime

super

end

def cleanup_view_runtime

Extracted source (around line #137):

135 136 137 138 139 140

@_response_body = nil

process_action(action_name, *args)

end

# Delegates to the class' #controller_path

Extracted source (around line #30):

28 29 30 31 32 33

def process(*) #:nodoc:

old_config, I18n.config = I18n.config, I18nProxy.new(I18n.config, lookup_context)

super

ensure

I18n.config = old_config

end

Extracted source (around line #195):

193 194 195 196 197 198

@_env = request.env

@_env['action_controller.instance'] = self

process(name)

to_a

end

Extracted source (around line #13):

11 12 13 14 15 16

def dispatch(action, request)

set_response!(request)

super(action, request)

end

def response_body=(body)

Extracted source (around line #236):

234 235 236 237 238 239

end

else

lambda { |env| new.dispatch(name, klass.new(env)) }

end

end

Extracted source (around line #73):

71 72 73 74 75 76

def dispatch(controller, action, env)

controller.action(action).call(env)

end

def normalize_controller!(params)

Extracted source (around line #73):

71 72 73 74 75 76

def dispatch(controller, action, env)

controller.action(action).call(env)

end

def normalize_controller!(params)

Extracted source (around line #42):

40 41 42 43 44 45

end

dispatch(controller, params[:action], req.env)

end

def prepare_params!(params)

Extracted source (around line #43):

41 42 43 44 45 46

req.path_parameters = set_params.merge parameters

status, headers, body = route.app.serve(req)

if 'pass' == headers['X-Cascade']

req.script_name = script_name

Extracted source (around line #30):

28 29 30 31 32 33

def serve(req)

find_routes(req).each do |match, parameters, route|

set_params = req.path_parameters

path_info = req.path_info

script_name = req.script_name

Extracted source (around line #30):

28 29 30 31 32 33

def serve(req)

find_routes(req).each do |match, parameters, route|

set_params = req.path_parameters

path_info = req.path_info

script_name = req.script_name

Extracted source (around line #802):

800 801 802 803 804 805

req = request_class.new(env)

req.path_info = Journey::Router::Utils.normalize_path(req.path_info)

@router.serve(req)

end

def recognize_path(path, environment = {})

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #30):

28 29 30 31 32 33

def traced_call(env)

@app.call(env)

end

end

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #32):

30 31 32 33 34 35

def traced_call(env)

result = @app.call(env) # [status, headers, response]

js_to_inject = NewRelic::Agent.browser_timing_header

if (js_to_inject != "") && should_instrument?(env, result[0], result[1])

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #164):

162 163 164 165 166 167

end

@app.call(env)

end

# Checks to see if any redirect options were passed in

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #54):

52 53 54 55 56 57

@check_after = Time.now.to_f + @dwell if @dwell

end

@app.call(env)

end

end

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #14):

12 13 14 15 16 17

#p "-" * 100

#p env.inspect

@app.call(env)

end

end

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #35):

33 34 35 36 37 38

env['warden'] = Proxy.new(env, self)

result = catch(:warden) do

@app.call(env)

end

result ||= {}

Extracted source (around line #34):

32 33 34 35 36 37

env['warden'] = Proxy.new(env, self)

result = catch(:warden) do

@app.call(env)

end

Extracted source (around line #34):

32 33 34 35 36 37

env['warden'] = Proxy.new(env, self)

result = catch(:warden) do

@app.call(env)

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #24):

22 23 24 25 26 27

def call(env)

status, headers, body = @app.call(env)

if etag_status?(status) && etag_body?(body) && !skip_caching?(headers)

original_body = body

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #25):

23 24 25 26 27 28

case env[REQUEST_METHOD]

when "GET", "HEAD"

status, headers, body = @app.call(env)

headers = Utils::HeaderHash.new(headers)

if status == 200 && fresh?(env, headers)

status = 304

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #13):

11 12 13 14 15 16

def call(env)

status, headers, body = @app.call(env)

if env[REQUEST_METHOD] == HEAD

[

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #27):

25 26 27 28 29 30

end

@app.call(env)

end

private

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #260):

258 259 260 261 262 263

def call(env)

@app.call(env)

ensure

session = Request::Session.find(env) || {}

flash_hash = env[KEY]

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #225):

223 224 225 226 227 228

def context(env, [email protected])

prepare_session(env)

status, headers, body = app.call(env)

commit_session(env, status, headers, body)

end

Extracted source (around line #220):

218 219 220 221 222 223

def call(env)

context(env)

end

def context(env, [email protected])

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #560):

558 559 560 561 562 563

def call(env)

status, headers, body = @app.call(env)

if cookie_jar = env['action_dispatch.cookies']

unless cookie_jar.committed?

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #36):

34 35 36 37 38 39

connection.enable_query_cache!

response = @app.call(env)

response[2] = Rack::BodyProxy.new(response[2]) do

restore_query_cache_settings(connection_id, enabled)

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #23):

21 22 23 24 25 26

# rubocop:disable Lint/RescueException

begin

response = @app.call(env)

rescue Exception => ex

notify_airbrake(ex, env)

raise ex

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #647):

645 646 647 648 649 650

testing = env['rack.test']

response = @app.call(env)

response[2] = ::Rack::BodyProxy.new(response[2]) do

ActiveRecord::Base.clear_active_connections! unless testing

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #29):

27 28 29 30 31 32

result = run_callbacks :call do

begin

@app.call(env)

rescue => error

end

end

Extracted source (around line #88):

86 87 88 89 90 91

def _run_callbacks(callbacks, &block)

if callbacks.empty?

block.call if block

else

runner = callbacks.compile

e = Filters::Environment.new(self, false, nil, block)

Extracted source (around line #88):

86 87 88 89 90 91

def _run_callbacks(callbacks, &block)

if callbacks.empty?

block.call if block

else

runner = callbacks.compile

e = Filters::Environment.new(self, false, nil, block)

Extracted source (around line #734):

732 733 734 735 736 737

module_eval <<-RUBY, __FILE__, __LINE__ + 1

def _run_#{name}_callbacks(&block)

_run_callbacks(_#{name}_callbacks, &block)

end

RUBY

end

Extracted source (around line #81):

79 80 81 82 83 84

# end

def run_callbacks(kind, &block)

send "_run_#{kind}_callbacks", &block

end

private

Extracted source (around line #27):

25 26 27 28 29 30

def call(env)

error = nil

result = run_callbacks :call do

begin

@app.call(env)

rescue => error

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #78):

76 77 78 79 80 81

def call(env)

env["action_dispatch.remote_ip"] = GetIp.new(env, self)

@app.call(env)

end

# The GetIp class exists as a way to defer processing of the request data

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #58):

56 57 58 59 60 61

better_errors_call env

else

@app.call env

end

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #17):

15 16 17 18 19 20

def call(env)

_, headers, body = response = @app.call(env)

if headers['X-Cascade'] == 'pass'

body.close if body.respond_to?(:close)

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #30):

28 29 30 31 32 33

def call(env)

@app.call(env)

rescue Exception => exception

if env['action_dispatch.show_exceptions'] == false

raise exception

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #38):

36 37 38 39 40 41

instrumenter.start 'request.action_dispatch', request: request

logger.info { started_request_message(request) }

resp = @app.call(env)

resp[2] = ::Rack::BodyProxy.new(resp[2]) { finish(request) }

resp

rescue Exception

Extracted source (around line #20):

18 19 20 21 22 23

if logger.respond_to?(:tagged)

logger.tagged(compute_tags(request)) { call_app(request, env) }

else

call_app(request, env)

end

Extracted source (around line #68):

66 67 68 69 70 71

def tagged(*tags)

formatter.tagged(*tags) { yield self }

end

def flush

Extracted source (around line #26):

24 25 26 27 28 29

def tagged(*tags)

new_tags = push_tags(*tags)

yield self

ensure

pop_tags(new_tags.size)

end

Extracted source (around line #68):

66 67 68 69 70 71

def tagged(*tags)

formatter.tagged(*tags) { yield self }

end

def flush

Extracted source (around line #20):

18 19 20 21 22 23

if logger.respond_to?(:tagged)

logger.tagged(compute_tags(request)) { call_app(request, env) }

else

call_app(request, env)

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #9):

7 8 9 10 11 12

def call(env)

RequestStore.begin!

@app.call(env)

ensure

RequestStore.end!

RequestStore.clear!

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #21):

19 20 21 22 23 24

def call(env)

env["action_dispatch.request_id"] = external_request_id(env) || internal_request_id

@app.call(env).tap { |_status, headers, _body| headers["X-Request-Id"] = env["action_dispatch.request_id"] }

end

private

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #22):

20 21 22 23 24 25

end

@app.call(env)

end

def method_override(env)

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #18):

16 17 18 19 20 21

def call(env)

start_time = clock_time

status, headers, body = @app.call(env)

request_time = clock_time - start_time

if !headers.has_key?(@header_name)

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #28):

26 27 28 29 30 31

def call(env)

LocalCacheRegistry.set_cache_for(local_cache_key, LocalStore.new)

response = @app.call(env)

response[2] = ::Rack::BodyProxy.new(response[2]) do

LocalCacheRegistry.set_cache_for(local_cache_key, nil)

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #17):

15 16 17 18 19 20

old, env[FLAG] = env[FLAG], false

@mutex.lock

response = @app.call(env)

body = BodyProxy.new(response[2]) { @mutex.unlock }

response[2] = body

response

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #113):

111 112 113 114 115 116

end

@app.call(env)

end

end

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #113):

111 112 113 114 115 116

def call(env)

status, headers, body = @app.call(env)

if body.respond_to?(:to_path)

case type = variation(env)

when 'X-Accel-Redirect'

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #518):

516 517 518 519 520 521

env["ROUTES_#{routes.object_id}_SCRIPT_NAME"] = env['SCRIPT_NAME'].dup

end

app.call(env)

end

# Defines additional Rack env configuration that is added on each call.

Extracted source (around line #164):

162 163 164 165 166 167

env["ORIGINAL_FULLPATH"] = build_original_fullpath(env)

env["ORIGINAL_SCRIPT_NAME"] = env["SCRIPT_NAME"]

super(env)

end

# Reload application routes regardless if they changed or not.

Extracted source (around line #194):

192 193 194 195 196 197

def method_missing(name, *args, &block)

if instance.respond_to?(name)

instance.public_send(name, *args, &block)

else

super

end

Extracted source (around line #194):

192 193 194 195 196 197

def method_missing(name, *args, &block)

if instance.respond_to?(name)

instance.public_send(name, *args, &block)

else

super

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #66):

64 65 66 67 68 69

env['PATH_INFO'] = rest

return app.call(env)

end

[404, {CONTENT_TYPE => "text/plain", "X-Cascade" => "pass"}, ["Not Found: #{path}"]]

Extracted source (around line #50):

48 49 50 51 52 53

sPort = env['SERVER_PORT']

@mapping.each do |host, location, match, app|

unless casecmp?(hHost, host) \

|| casecmp?(sName, host) \

|| (!host && (casecmp?(hHost, sName) ||

Extracted source (around line #50):

48 49 50 51 52 53

sPort = env['SERVER_PORT']

@mapping.each do |host, location, match, app|

unless casecmp?(hHost, host) \

|| casecmp?(sName, host) \

|| (!host && (casecmp?(hHost, sName) ||

Extracted source (around line #94):

92 93 94 95 96 97

begin

status, headers, body = @app.call(env)

rescue => e

if !should_swallow_app_error?(e, socket_wrapper)

# It's a good idea to catch application exceptions here because

Extracted source (around line #149):

147 148 149 150 151 152

begin

if headers[REQUEST_METHOD] == GET

process_request(headers, connection, socket_wrapper, @protocol == :http)

elsif headers[REQUEST_METHOD] == PING

process_ping(headers, connection)

false

Extracted source (around line #110):

108 109 110 111 112 113

finish_callback.call

while true

hijacked = accept_and_process_next_request(socket_wrapper, channel, buffer)

socket_wrapper = Utils::UnseekableSocket.new if hijacked

end

rescue Interrupted

Extracted source (around line #415):

413 414 415 416 417 418

handler = thread_handler.new(self, main_socket_options)

handler.install

handler.main_loop(set_initialization_state_to_true)

ensure

set_initialization_state.call(false)

unregister_current_thread

Extracted source (around line #111):

109 110 111 112 113 114

Thread.current.abort_on_exception = true

begin

yield(*args)

rescue SystemExit

raise

rescue Exception => e

Rails.root: /home/webistrano/sp/ru/production/current

Request

Parameters:

{"city"=>"kremenki", "search_term"=>"Молоко"} lat: #<BigDecimal:7f84a3a299f8,'0.543833333E2',18(27)> layout_name: "application" lng: #<BigDecimal:7f84a3a29980,'0.371166667E2',18(27)> user_address: "Кременки" HTTP_ACCEPT: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" HTTP_ACCEPT_CHARSET: "windows-1251,utf-8;q=0.7,*;q=0.7" HTTP_ACCEPT_ENCODING: "identity" HTTP_ACCEPT_LANGUAGE: "en-US,en;q=0.5" HTTP_CACHE_CONTROL: "no-cache" REMOTE_ADDR: "194.67.209.252" SERVER_NAME: "www.shoppingplus.ru" SERVER_PROTOCOL: "HTTP/1.1"

Response

Headers:

None

www.shoppingplus.ru

Action Controller: Exception caught

RSolr::Error::Http - 404 Not Found Error: NOT_FOUND URI: http://78.46.105.244:8902/solr-production-ru/select?wt=ruby Request Headers: {"Content-Type"=>"application/x-www-form-urlencoded; charset=UTF-8"} Request Data: "fq=type%3ACatalogLocation&fq=valid_from_ds%3A%7B*+TO+2018%5C-05%5C-04T00%5C%3A00%5C%3A00Z%7D&fq=valid_until_ds%3A%7B2018%5C-05%5C-04T00%5C%3A00%5C%3A00Z+TO+*%7D&fq=e_shop_bs%3Atrue+OR+_query_%3A%22%7B%21geofilt+pt%3D67.5758933%2C33.4131997+sfield%3Dlat_lon_gs+d%3D50%7D%22&sort=position_i+asc%2C+score+asc&q=%D0%9C%D0%BE%D0%BB%D0%BE%D0%BA%D0%BE&fl=*+score&qf=title_text+tags_texts&defType=edismax&start=0&rows=0&facet=true&f.catalog_id_is.facet.limit=200&f.catalog_id_is.facet.mincount=1&facet.field=catalog_id_is" Backtrace: /home/webistrano/.new_sp_bundle/ruby/2.2.0/gems/rsolr-1.1.2/lib/rsolr/client.rb:288:in `adapt_response' /home/webistrano/.new_sp_bundle/ruby/2.2.0/gems/rsolr-1.1.2/lib/rsolr/client.rb:189:in `execute' /home/webistrano/.new_sp_bundle/ruby/2.2.0/gems/rsolr-1.1.2/lib/rsolr/client.rb:175:in `send_and_receive' /home/webistrano/.new_sp_bundle/ruby/2.2.0/gems/sunspot_rails-2.2.7/lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation' /home/webistrano/.new_sp_bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `block in instrument' /home/webistrano/.new_sp_bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /home/webistrano/.new_sp_bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `instrument' /home/webistrano/.new_sp_bundle/ruby/2.2.0/gems/sunspot_rails-2.2.7/lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation' (eval):2:in `post' /home/webistrano/.new_sp_bundle/ruby/2.2.0/gems/sunspot-2.2.7/lib/sunspot/search/abstract_search.rb:49:in `execute' /home/webistrano/.new_sp_bundle/ruby/2.2.0/gems/sunspot-2.2.7/lib/sunspot/session.rb:59:in `search'

Extracted source (around line #288):

286 287 288 289 290 291

raise "The response does not have the correct keys => :body, :headers, :status" unless

%W(body headers status) == response.keys.map{|k|k.to_s}.sort

raise RSolr::Error::Http.new request, response unless [200,302].include? response[:status]

result = if respond_to? "evaluate_#{request[:params][:wt]}_response", true

send "evaluate_#{request[:params][:wt]}_response", request, response

Extracted source (around line #189):

187 188 189 190 191 192

end

adapt_response(request_context, raw_response) unless raw_response.nil?

end

def retry_503?(request_context, response)

Extracted source (around line #175):

173 174 175 176 177 178

def send_and_receive path, opts

request_context = build_request path, opts

execute request_context

end

#

Extracted source (around line #16):

14 15 16 17 18 19

payload = {:path => path, :parameters => parameters}

ActiveSupport::Notifications.instrument("request.rsolr", payload) do

send_and_receive_without_as_instrumentation(path, opts)

end

end

end

Extracted source (around line #164):

162 163 164 165 166 167

def instrument(name, payload = {})

if notifier.listening?(name)

instrumenter.instrument(name, payload) { yield payload if block_given? }

else

yield payload if block_given?

end

Extracted source (around line #20):

18 19 20 21 22 23

start name, payload

begin

yield payload

rescue Exception => e

payload[:exception] = [e.class.name, e.message]

raise e

Extracted source (around line #164):

162 163 164 165 166 167

def instrument(name, payload = {})

if notifier.listening?(name)

instrumenter.instrument(name, payload) { yield payload if block_given? }

else

yield payload if block_given?

end

Extracted source (around line #15):

13 14 15 16 17 18

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

Extracted source (around line #49):

47 48 49 50 51 52

reset

params = @query.to_params

@solr_result = @connection.post "#{request_handler}", :data => params

self

end

Extracted source (around line #59):

57 58 59 60 61 62

def search(*types, &block)

search = new_search(*types, &block)

search.execute

end

#

Extracted source (around line #11):

9 10 11 12 13 14

module_eval(<<-RUBY, __FILE__, __LINE__ + 1)

def #{method}(*args, &block)

#{delegate}.#{method}(*args, &block)

end

RUBY

end

Extracted source (around line #383):

381 382 383 384 385 386

#

def search(*types, &block)

session.search(*types, &block)

end

def new_more_like_this(object, *types, &block)

Extracted source (around line #364):

362 363 364 365 366 367

alias_method method_name, _traced_method_name(method_name, metric_name_code)

send visibility, method_name

send visibility, _traced_method_name(method_name, metric_name_code)

::NewRelic::Agent.logger.debug("Traced method: class = #{derived_class_name},"+

"method = #{method_name}, "+

"metric = '#{metric_name_code}'")

Extracted source (around line #81):

79 80 81 82 83 84

begin

yield

ensure

segment.finish

end

Extracted source (around line #362):

360 361 362 363 364 365

class_eval traced_method, __FILE__, __LINE__

alias_method _untraced_method_name(method_name, metric_name_code), method_name

alias_method method_name, _traced_method_name(method_name, metric_name_code)

send visibility, method_name

send visibility, _traced_method_name(method_name, metric_name_code)

::NewRelic::Agent.logger.debug("Traced method: class = #{derived_class_name},"+

Extracted source (around line #287):

285 286 287 288 289 290

def search(term, options = {})

catalogs = Sunspot.search(CatalogLocation) do

with(:valid_from).less_than Date.today

with(:valid_until).greater_than Date.today

Extracted source (around line #29):

27 28 29 30 31 32

term_search = (defined?(@product) && [email protected]?) ? @product.title : @search_term

@catalogs = Catalog.search(term_search, opts)

searched_pages = Page.search(term_search, opts).compact rescue []

Extracted source (around line #4):

2 3 4 5 6 7

module ImplicitRender

def send_action(method, *args)

ret = super

default_render unless performed?

ret

end

Extracted source (around line #198):

196 197 198 199 200 201

# which is *not* necessarily the same as the action name.

def process_action(method_name, *args)

send_action(method_name, *args)

end

# Actually call the method associated with the action. Override

Extracted source (around line #10):

8 9 10 11 12 13

def process_action(*) #:nodoc:

self.formats = request.formats.map(&:ref).compact

super

end

# Check for double render errors and set the content_type after rendering.

Extracted source (around line #20):

18 19 20 21 22 23

def process_action(*args)

run_callbacks(:process_action) do

super

end

end

Extracted source (around line #117):

115 116 117 118 119 120

def call(env)

block = env.run_block

env.value = !env.halted && (!block || block.call)

env

end

end

Extracted source (around line #117):

115 116 117 118 119 120

def call(env)

block = env.run_block

env.value = !env.halted && (!block || block.call)

env

end

end

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #234):

232 233 234 235 236 237

def self.halting(next_callback, user_callback)

lambda { |env|

env = next_callback.call env

unless env.halted

user_callback.call env.target, env.value

end

Extracted source (around line #234):

232 233 234 235 236 237

def self.halting(next_callback, user_callback)

lambda { |env|

env = next_callback.call env

unless env.halted

user_callback.call env.target, env.value

end

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #234):

232 233 234 235 236 237

def self.halting(next_callback, user_callback)

lambda { |env|

env = next_callback.call env

unless env.halted

user_callback.call env.target, env.value

end

Extracted source (around line #234):

232 233 234 235 236 237

def self.halting(next_callback, user_callback)

lambda { |env|

env = next_callback.call env

unless env.halted

user_callback.call env.target, env.value

end

Extracted source (around line #234):

232 233 234 235 236 237

def self.halting(next_callback, user_callback)

lambda { |env|

env = next_callback.call env

unless env.halted

user_callback.call env.target, env.value

end

Extracted source (around line #234):

232 233 234 235 236 237

def self.halting(next_callback, user_callback)

lambda { |env|

env = next_callback.call env

unless env.halted

user_callback.call env.target, env.value

end

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #308):

306 307 308 309 310 311

else

user_callback.call(target, value) {

env = next_callback.call env

env.value

}

env

Extracted source (around line #308):

306 307 308 309 310 311

else

user_callback.call(target, value) {

env = next_callback.call env

env.value

}

env

Extracted source (around line #27):

25 26 27 28 29 30

end

yield

ensure

I18n.default_locale = current_default_locale if tmp_default_locale

Extracted source (around line #427):

425 426 427 428 429 430

case filter

when Symbol

lambda { |target, _, &blk| target.send filter, &blk }

when String

l = eval "lambda { |value| #{filter} }"

lambda { |target, value| target.instance_exec(value, &l) }

Extracted source (around line #307):

305 306 307 308 309 310

next_callback.call env

else

user_callback.call(target, value) {

env = next_callback.call env

env.value

}

Extracted source (around line #307):

305 306 307 308 309 310

next_callback.call env

else

user_callback.call(target, value) {

env = next_callback.call env

env.value

}

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #169):

167 168 169 170 171 172

end

end

next_callback.call env

}

end

private_class_method :halting

Extracted source (around line #92):

90 91 92 93 94 95

runner = callbacks.compile

e = Filters::Environment.new(self, false, nil, block)

runner.call(e).value

end

end

Extracted source (around line #92):

90 91 92 93 94 95

runner = callbacks.compile

e = Filters::Environment.new(self, false, nil, block)

runner.call(e).value

end

end

Extracted source (around line #734):

732 733 734 735 736 737

module_eval <<-RUBY, __FILE__, __LINE__ + 1

def _run_#{name}_callbacks(&block)

_run_callbacks(_#{name}_callbacks, &block)

end

RUBY

end

Extracted source (around line #81):

79 80 81 82 83 84

# end

def run_callbacks(kind, &block)

send "_run_#{kind}_callbacks", &block

end

private

Extracted source (around line #19):

17 18 19 20 21 22

# process_action callbacks around the normal behavior.

def process_action(*args)

run_callbacks(:process_action) do

super

end

end

Extracted source (around line #29):

27 28 29 30 31 32

private

def process_action(*args)

super

rescue Exception => exception

request.env['action_dispatch.show_detailed_exceptions'] ||= show_detailed_exceptions?

rescue_with_handler(exception) || raise(exception)

Extracted source (around line #31):

29 30 31 32 33 34

ActiveSupport::Notifications.instrument("process_action.action_controller", raw_payload) do |payload|

result = super

payload[:status] = response.status

append_info_to_payload(payload)

result

Extracted source (around line #164):

162 163 164 165 166 167

def instrument(name, payload = {})

if notifier.listening?(name)

instrumenter.instrument(name, payload) { yield payload if block_given? }

else

yield payload if block_given?

end

Extracted source (around line #20):

18 19 20 21 22 23

start name, payload

begin

yield payload

rescue Exception => e

payload[:exception] = [e.class.name, e.message]

raise e

Extracted source (around line #164):

162 163 164 165 166 167

def instrument(name, payload = {})

if notifier.listening?(name)

instrumenter.instrument(name, payload) { yield payload if block_given? }

else

yield payload if block_given?

end

Extracted source (around line #30):

28 29 30 31 32 33

ActiveSupport::Notifications.instrument("start_processing.action_controller", raw_payload.dup)

ActiveSupport::Notifications.instrument("process_action.action_controller", raw_payload) do |payload|

result = super

payload[:status] = response.status

append_info_to_payload(payload)

Extracted source (around line #250):

248 249 250 251 252 253

request.filtered_parameters.merge! wrapped_filtered_hash

end

super

end

private

Extracted source (around line #18):

16 17 18 19 20 21

# and it won't be cleaned up by the method below.

ActiveRecord::LogSubscriber.reset_runtime

super

end

def cleanup_view_runtime

Extracted source (around line #137):

135 136 137 138 139 140

@_response_body = nil

process_action(action_name, *args)

end

# Delegates to the class' #controller_path

Extracted source (around line #30):

28 29 30 31 32 33

def process(*) #:nodoc:

old_config, I18n.config = I18n.config, I18nProxy.new(I18n.config, lookup_context)

super

ensure

I18n.config = old_config

end

Extracted source (around line #195):

193 194 195 196 197 198

@_env = request.env

@_env['action_controller.instance'] = self

process(name)

to_a

end

Extracted source (around line #13):

11 12 13 14 15 16

def dispatch(action, request)

set_response!(request)

super(action, request)

end

def response_body=(body)

Extracted source (around line #236):

234 235 236 237 238 239

end

else

lambda { |env| new.dispatch(name, klass.new(env)) }

end

end

Extracted source (around line #73):

71 72 73 74 75 76

def dispatch(controller, action, env)

controller.action(action).call(env)

end

def normalize_controller!(params)

Extracted source (around line #73):

71 72 73 74 75 76

def dispatch(controller, action, env)

controller.action(action).call(env)

end

def normalize_controller!(params)

Extracted source (around line #42):

40 41 42 43 44 45

end

dispatch(controller, params[:action], req.env)

end

def prepare_params!(params)

Extracted source (around line #43):

41 42 43 44 45 46

req.path_parameters = set_params.merge parameters

status, headers, body = route.app.serve(req)

if 'pass' == headers['X-Cascade']

req.script_name = script_name

Extracted source (around line #30):

28 29 30 31 32 33

def serve(req)

find_routes(req).each do |match, parameters, route|

set_params = req.path_parameters

path_info = req.path_info

script_name = req.script_name

Extracted source (around line #30):

28 29 30 31 32 33

def serve(req)

find_routes(req).each do |match, parameters, route|

set_params = req.path_parameters

path_info = req.path_info

script_name = req.script_name

Extracted source (around line #802):

800 801 802 803 804 805

req = request_class.new(env)

req.path_info = Journey::Router::Utils.normalize_path(req.path_info)

@router.serve(req)

end

def recognize_path(path, environment = {})

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #30):

28 29 30 31 32 33

def traced_call(env)

@app.call(env)

end

end

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #32):

30 31 32 33 34 35

def traced_call(env)

result = @app.call(env) # [status, headers, response]

js_to_inject = NewRelic::Agent.browser_timing_header

if (js_to_inject != "") && should_instrument?(env, result[0], result[1])

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #164):

162 163 164 165 166 167

end

@app.call(env)

end

# Checks to see if any redirect options were passed in

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #54):

52 53 54 55 56 57

@check_after = Time.now.to_f + @dwell if @dwell

end

@app.call(env)

end

end

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #14):

12 13 14 15 16 17

#p "-" * 100

#p env.inspect

@app.call(env)

end

end

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #35):

33 34 35 36 37 38

env['warden'] = Proxy.new(env, self)

result = catch(:warden) do

@app.call(env)

end

result ||= {}

Extracted source (around line #34):

32 33 34 35 36 37

env['warden'] = Proxy.new(env, self)

result = catch(:warden) do

@app.call(env)

end

Extracted source (around line #34):

32 33 34 35 36 37

env['warden'] = Proxy.new(env, self)

result = catch(:warden) do

@app.call(env)

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #24):

22 23 24 25 26 27

def call(env)

status, headers, body = @app.call(env)

if etag_status?(status) && etag_body?(body) && !skip_caching?(headers)

original_body = body

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #25):

23 24 25 26 27 28

case env[REQUEST_METHOD]

when "GET", "HEAD"

status, headers, body = @app.call(env)

headers = Utils::HeaderHash.new(headers)

if status == 200 && fresh?(env, headers)

status = 304

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #13):

11 12 13 14 15 16

def call(env)

status, headers, body = @app.call(env)

if env[REQUEST_METHOD] == HEAD

[

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #27):

25 26 27 28 29 30

end

@app.call(env)

end

private

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #260):

258 259 260 261 262 263

def call(env)

@app.call(env)

ensure

session = Request::Session.find(env) || {}

flash_hash = env[KEY]

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #225):

223 224 225 226 227 228

def context(env, [email protected])

prepare_session(env)

status, headers, body = app.call(env)

commit_session(env, status, headers, body)

end

Extracted source (around line #220):

218 219 220 221 222 223

def call(env)

context(env)

end

def context(env, [email protected])

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #560):

558 559 560 561 562 563

def call(env)

status, headers, body = @app.call(env)

if cookie_jar = env['action_dispatch.cookies']

unless cookie_jar.committed?

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #36):

34 35 36 37 38 39

connection.enable_query_cache!

response = @app.call(env)

response[2] = Rack::BodyProxy.new(response[2]) do

restore_query_cache_settings(connection_id, enabled)

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #23):

21 22 23 24 25 26

# rubocop:disable Lint/RescueException

begin

response = @app.call(env)

rescue Exception => ex

notify_airbrake(ex, env)

raise ex

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #647):

645 646 647 648 649 650

testing = env['rack.test']

response = @app.call(env)

response[2] = ::Rack::BodyProxy.new(response[2]) do

ActiveRecord::Base.clear_active_connections! unless testing

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #29):

27 28 29 30 31 32

result = run_callbacks :call do

begin

@app.call(env)

rescue => error

end

end

Extracted source (around line #88):

86 87 88 89 90 91

def _run_callbacks(callbacks, &block)

if callbacks.empty?

block.call if block

else

runner = callbacks.compile

e = Filters::Environment.new(self, false, nil, block)

Extracted source (around line #88):

86 87 88 89 90 91

def _run_callbacks(callbacks, &block)

if callbacks.empty?

block.call if block

else

runner = callbacks.compile

e = Filters::Environment.new(self, false, nil, block)

Extracted source (around line #734):

732 733 734 735 736 737

module_eval <<-RUBY, __FILE__, __LINE__ + 1

def _run_#{name}_callbacks(&block)

_run_callbacks(_#{name}_callbacks, &block)

end

RUBY

end

Extracted source (around line #81):

79 80 81 82 83 84

# end

def run_callbacks(kind, &block)

send "_run_#{kind}_callbacks", &block

end

private

Extracted source (around line #27):

25 26 27 28 29 30

def call(env)

error = nil

result = run_callbacks :call do

begin

@app.call(env)

rescue => error

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #78):

76 77 78 79 80 81

def call(env)

env["action_dispatch.remote_ip"] = GetIp.new(env, self)

@app.call(env)

end

# The GetIp class exists as a way to defer processing of the request data

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #58):

56 57 58 59 60 61

better_errors_call env

else

@app.call env

end

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #17):

15 16 17 18 19 20

def call(env)

_, headers, body = response = @app.call(env)

if headers['X-Cascade'] == 'pass'

body.close if body.respond_to?(:close)

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #30):

28 29 30 31 32 33

def call(env)

@app.call(env)

rescue Exception => exception

if env['action_dispatch.show_exceptions'] == false

raise exception

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #38):

36 37 38 39 40 41

instrumenter.start 'request.action_dispatch', request: request

logger.info { started_request_message(request) }

resp = @app.call(env)

resp[2] = ::Rack::BodyProxy.new(resp[2]) { finish(request) }

resp

rescue Exception

Extracted source (around line #20):

18 19 20 21 22 23

if logger.respond_to?(:tagged)

logger.tagged(compute_tags(request)) { call_app(request, env) }

else

call_app(request, env)

end

Extracted source (around line #68):

66 67 68 69 70 71

def tagged(*tags)

formatter.tagged(*tags) { yield self }

end

def flush

Extracted source (around line #26):

24 25 26 27 28 29

def tagged(*tags)

new_tags = push_tags(*tags)

yield self

ensure

pop_tags(new_tags.size)

end

Extracted source (around line #68):

66 67 68 69 70 71

def tagged(*tags)

formatter.tagged(*tags) { yield self }

end

def flush

Extracted source (around line #20):

18 19 20 21 22 23

if logger.respond_to?(:tagged)

logger.tagged(compute_tags(request)) { call_app(request, env) }

else

call_app(request, env)

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #9):

7 8 9 10 11 12

def call(env)

RequestStore.begin!

@app.call(env)

ensure

RequestStore.end!

RequestStore.clear!

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #21):

19 20 21 22 23 24

def call(env)

env["action_dispatch.request_id"] = external_request_id(env) || internal_request_id

@app.call(env).tap { |_status, headers, _body| headers["X-Request-Id"] = env["action_dispatch.request_id"] }

end

private

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #22):

20 21 22 23 24 25

end

@app.call(env)

end

def method_override(env)

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #18):

16 17 18 19 20 21

def call(env)

start_time = clock_time

status, headers, body = @app.call(env)

request_time = clock_time - start_time

if !headers.has_key?(@header_name)

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #28):

26 27 28 29 30 31

def call(env)

LocalCacheRegistry.set_cache_for(local_cache_key, LocalStore.new)

response = @app.call(env)

response[2] = ::Rack::BodyProxy.new(response[2]) do

LocalCacheRegistry.set_cache_for(local_cache_key, nil)

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #17):

15 16 17 18 19 20

old, env[FLAG] = env[FLAG], false

@mutex.lock

response = @app.call(env)

body = BodyProxy.new(response[2]) { @mutex.unlock }

response[2] = body

response

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #113):

111 112 113 114 115 116

end

@app.call(env)

end

end

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #113):

111 112 113 114 115 116

def call(env)

status, headers, body = @app.call(env)

if body.respond_to?(:to_path)

case type = variation(env)

when 'X-Accel-Redirect'

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #518):

516 517 518 519 520 521

env["ROUTES_#{routes.object_id}_SCRIPT_NAME"] = env['SCRIPT_NAME'].dup

end

app.call(env)

end

# Defines additional Rack env configuration that is added on each call.

Extracted source (around line #164):

162 163 164 165 166 167

env["ORIGINAL_FULLPATH"] = build_original_fullpath(env)

env["ORIGINAL_SCRIPT_NAME"] = env["SCRIPT_NAME"]

super(env)

end

# Reload application routes regardless if they changed or not.

Extracted source (around line #194):

192 193 194 195 196 197

def method_missing(name, *args, &block)

if instance.respond_to?(name)

instance.public_send(name, *args, &block)

else

super

end

Extracted source (around line #194):

192 193 194 195 196 197

def method_missing(name, *args, &block)

if instance.respond_to?(name)

instance.public_send(name, *args, &block)

else

super

end

Extracted source (around line #96):

94 95 96 97 98 99

events.notify(:before_call, env) if first_middleware

result = (target == self) ? traced_call(env) : target.call(env)

if first_middleware

capture_response_attributes(state, result)

Extracted source (around line #66):

64 65 66 67 68 69

env['PATH_INFO'] = rest

return app.call(env)

end

[404, {CONTENT_TYPE => "text/plain", "X-Cascade" => "pass"}, ["Not Found: #{path}"]]

Extracted source (around line #50):

48 49 50 51 52 53

sPort = env['SERVER_PORT']

@mapping.each do |host, location, match, app|

unless casecmp?(hHost, host) \

|| casecmp?(sName, host) \

|| (!host && (casecmp?(hHost, sName) ||

Extracted source (around line #50):

48 49 50 51 52 53

sPort = env['SERVER_PORT']

@mapping.each do |host, location, match, app|

unless casecmp?(hHost, host) \

|| casecmp?(sName, host) \

|| (!host && (casecmp?(hHost, sName) ||

Extracted source (around line #94):

92 93 94 95 96 97

begin

status, headers, body = @app.call(env)

rescue => e

if !should_swallow_app_error?(e, socket_wrapper)

# It's a good idea to catch application exceptions here because

Extracted source (around line #149):

147 148 149 150 151 152

begin

if headers[REQUEST_METHOD] == GET

process_request(headers, connection, socket_wrapper, @protocol == :http)

elsif headers[REQUEST_METHOD] == PING

process_ping(headers, connection)

false

Extracted source (around line #110):

108 109 110 111 112 113

finish_callback.call

while true

hijacked = accept_and_process_next_request(socket_wrapper, channel, buffer)

socket_wrapper = Utils::UnseekableSocket.new if hijacked

end

rescue Interrupted

Extracted source (around line #415):

413 414 415 416 417 418

handler = thread_handler.new(self, main_socket_options)

handler.install

handler.main_loop(set_initialization_state_to_true)

ensure

set_initialization_state.call(false)

unregister_current_thread

Extracted source (around line #111):

109 110 111 112 113 114

Thread.current.abort_on_exception = true

begin

yield(*args)

rescue SystemExit

raise

rescue Exception => e

Rails.root: /home/webistrano/sp/ru/production/current

Request

Parameters:

{"city"=>"apatity", "search_term"=>"Молоко"} lat: #<BigDecimal:7f84cdc209d0,'0.675758933E2',18(27)> layout_name: "application" lng: #<BigDecimal:7f84cdc20980,'0.334131997E2',18(27)> user_address: "Апатиты" HTTP_ACCEPT: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" HTTP_ACCEPT_CHARSET: "windows-1251,utf-8;q=0.7,*;q=0.7" HTTP_ACCEPT_ENCODING: "identity" HTTP_ACCEPT_LANGUAGE: "en-US,en;q=0.5" HTTP_CACHE_CONTROL: "no-cache" REMOTE_ADDR: "194.67.209.252" SERVER_NAME: "www.shoppingplus.ru" SERVER_PROTOCOL: "HTTP/1.1"

Response

Headers:

None

www.shoppingplus.ru


Смотрите также