mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
FIX: correctly log topic timings as background
This commit is contained in:
@ -89,7 +89,7 @@ module Hijack
|
|||||||
io.close if io rescue nil
|
io.close if io rescue nil
|
||||||
|
|
||||||
if request_tracker
|
if request_tracker
|
||||||
status = instance.status rescue 500
|
status = response.status rescue 500
|
||||||
request_tracker.log_request_info(env, [status, headers || {}, []], timings)
|
request_tracker.log_request_info(env, [status, headers || {}, []], timings)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -97,7 +97,7 @@ class Middleware::RequestTracker
|
|||||||
status: status,
|
status: status,
|
||||||
is_crawler: helper.is_crawler?,
|
is_crawler: helper.is_crawler?,
|
||||||
has_auth_cookie: helper.has_auth_cookie?,
|
has_auth_cookie: helper.has_auth_cookie?,
|
||||||
is_background: request.path =~ /^\/message-bus\// || request.path == /\/topics\/timings/,
|
is_background: !!(request.path =~ /^\/message-bus\// || request.path =~ /\/topics\/timings/),
|
||||||
is_mobile: helper.is_mobile?,
|
is_mobile: helper.is_mobile?,
|
||||||
track_view: track_view,
|
track_view: track_view,
|
||||||
timing: timing
|
timing: timing
|
||||||
|
Reference in New Issue
Block a user