mirror of
https://github.com/discourse/discourse.git
synced 2025-02-07 20:53:59 +08:00
correct brokeness
This commit is contained in:
parent
acda6ebd60
commit
0ce6524153
|
@ -6,8 +6,7 @@ class Middleware::RequestTracker
|
||||||
@app = app
|
@app = app
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.log_request_on_site(data)
|
def self.log_request_on_site(data,host)
|
||||||
host = RailsMultisite::ConnectionManagement.host(env)
|
|
||||||
RailsMultisite::ConnectionManagement.with_hostname(host) do
|
RailsMultisite::ConnectionManagement.with_hostname(host) do
|
||||||
log_request(data)
|
log_request(data)
|
||||||
end
|
end
|
||||||
|
@ -73,10 +72,11 @@ class Middleware::RequestTracker
|
||||||
|
|
||||||
# we got to skip this on error ... its just logging
|
# we got to skip this on error ... its just logging
|
||||||
data = self.class.get_data(env,result) rescue nil
|
data = self.class.get_data(env,result) rescue nil
|
||||||
|
host = RailsMultisite::ConnectionManagement.host(env)
|
||||||
|
|
||||||
if data
|
if data
|
||||||
Scheduler::Defer.later("Track view", _db=nil) do
|
Scheduler::Defer.later("Track view", _db=nil) do
|
||||||
self.class.log_request_on_site(data)
|
self.class.log_request_on_site(data,host)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user