mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 06:49:14 +08:00
background reqs failed or not are always counted seperately
This commit is contained in:
parent
fcae399481
commit
fce9e296e7
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user