recolectar visitas a páginas

This commit is contained in:
f 2021-10-09 14:46:58 -03:00
parent 306d1ed983
commit e35cbe79eb

View file

@ -25,10 +25,10 @@ class StatCollectionJob < ApplicationJob
options = { interval: interval } options = { interval: interval }
# Visitas por hostname # Visitas por hostname
AccessLog.completed_requests.group(:host).rollup('host', **options) AccessLog.completed_requests.non_robots.pages.group(:host).rollup('host', **options)
combined_columns **options combined_columns(**options)
stats_by_site **options stats_by_site(**options)
end end
# Registrar que se hicieron todas las recolecciones # Registrar que se hicieron todas las recolecciones
@ -42,7 +42,7 @@ class StatCollectionJob < ApplicationJob
# Combinación de columnas # Combinación de columnas
def combined_columns(**options) def combined_columns(**options)
COLUMNS.each do |column| COLUMNS.each do |column|
AccessLog.completed_requests.group(:host, column).rollup("hostname|#{column}", **options) AccessLog.completed_requests.non_robots.pages.group(:host, column).rollup("host|#{column}", **options)
end end
end end