2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

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

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