mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 15:31:43 +00:00
pasar todas las uris a la base de datos
This commit is contained in:
parent
e4009e59dc
commit
e8300364d1
1 changed files with 12 additions and 16 deletions
|
@ -45,11 +45,8 @@ class UriCollectionJob < PeriodicJob
|
||||||
# que indican las páginas y recursos descargables, el resto son
|
# que indican las páginas y recursos descargables, el resto son
|
||||||
# imágenes, CSS, JS y tipografías que no nos aportan números
|
# imágenes, CSS, JS y tipografías que no nos aportan números
|
||||||
# significativos.
|
# significativos.
|
||||||
uris.each do |uri|
|
|
||||||
break if stop?
|
|
||||||
|
|
||||||
name = 'host|uri'
|
name = 'host|uri'
|
||||||
dimensions = { host: host, uri: uri }
|
dimensions = { host: host, uri: uris }
|
||||||
|
|
||||||
rollup(name, beginning, **dimensions)
|
rollup(name, beginning, **dimensions)
|
||||||
reduce_rollup(name, beginning, :sum, **dimensions)
|
reduce_rollup(name, beginning, :sum, **dimensions)
|
||||||
|
@ -58,14 +55,13 @@ class UriCollectionJob < PeriodicJob
|
||||||
# Obtener orígenes de visitas por host
|
# Obtener orígenes de visitas por host
|
||||||
values.each do |value|
|
values.each do |value|
|
||||||
column_name = "host|uri|#{column}"
|
column_name = "host|uri|#{column}"
|
||||||
column_dimensions = { host: host, uri: uri }
|
column_dimensions = { host: host, uri: uris }
|
||||||
column_dimensions[column] = value
|
column_dimensions[column] = value
|
||||||
|
|
||||||
rollup(column_name, beginning, **column_dimensions)
|
rollup(column_name, beginning, **column_dimensions)
|
||||||
reduce_rollup(column_name, beginning, :sum, **column_dimensions)
|
reduce_rollup(column_name, beginning, :sum, **column_dimensions)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
# Reducir todas las visitas a cantidad de visitas por host
|
# Reducir todas las visitas a cantidad de visitas por host
|
||||||
rollup('host', beginning, **host_dimensions)
|
rollup('host', beginning, **host_dimensions)
|
||||||
|
|
Loading…
Reference in a new issue