background reqs failed or not are always counted seperately

This commit is contained in:
Sam 2015-02-12 09:47:32 +11:00
parent fcae399481
commit fce9e296e7
1 changed files with 4 additions and 6 deletions

View File

@ -30,16 +30,14 @@ class Middleware::RequestTracker
if status >= 500
ApplicationRequest.increment!(:http_5xx)
elsif data[:is_background]
ApplicationRequest.increment!(:http_background)
elsif status >= 400
ApplicationRequest.increment!(:http_4xx)
elsif status >= 300
ApplicationRequest.increment!(:http_3xx)
else
if data[:is_background]
ApplicationRequest.increment!(:http_background)
elsif status >= 200 && status < 300
ApplicationRequest.increment!(:http_2xx)
end
elsif status >= 200 && status < 300
ApplicationRequest.increment!(:http_2xx)
end
end