5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-16 10:51:42 +00:00

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 }
# 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
stats_by_site **options
combined_columns(**options)
stats_by_site(**options)
end
# Registrar que se hicieron todas las recolecciones
@ -42,7 +42,7 @@ class StatCollectionJob < ApplicationJob
# Combinación de columnas
def combined_columns(**options)
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