remove distinct in dashboard monthly traffic counting
This commit is contained in:
parent
fe2c1a9235
commit
8d0c326bbc
|
@ -257,7 +257,7 @@ module ApplicationHelper
|
||||||
visits = Impression.where( created_at: {
|
visits = Impression.where( created_at: {
|
||||||
'$gte' => Time.now.beginning_of_day-i.days,
|
'$gte' => Time.now.beginning_of_day-i.days,
|
||||||
'$lte' => Time.now.end_of_day-i.days}
|
'$lte' => Time.now.end_of_day-i.days}
|
||||||
).distinct(:request_hash).count
|
).count
|
||||||
site.month_traffic_cache['result'].push([ Time.now.beginning_of_day-i.days, visits])
|
site.month_traffic_cache['result'].push([ Time.now.beginning_of_day-i.days, visits])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue