mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-03-22 04:45:46 -04:00
background reqs failed or not are always counted seperately
This commit is contained in:
parent
fcae399481
commit
fce9e296e7
1 changed files with 4 additions and 6 deletions
|
@ -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 a new issue