mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 13:51:41 +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,25 +45,21 @@ 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|
|
name = 'host|uri'
|
||||||
break if stop?
|
dimensions = { host: host, uri: uris }
|
||||||
|
|
||||||
name = 'host|uri'
|
rollup(name, beginning, **dimensions)
|
||||||
dimensions = { host: host, uri: uri }
|
reduce_rollup(name, beginning, :sum, **dimensions)
|
||||||
|
|
||||||
rollup(name, beginning, **dimensions)
|
columns.each_pair do |column, values|
|
||||||
reduce_rollup(name, beginning, :sum, **dimensions)
|
# Obtener orígenes de visitas por host
|
||||||
|
values.each do |value|
|
||||||
|
column_name = "host|uri|#{column}"
|
||||||
|
column_dimensions = { host: host, uri: uris }
|
||||||
|
column_dimensions[column] = value
|
||||||
|
|
||||||
columns.each_pair do |column, values|
|
rollup(column_name, beginning, **column_dimensions)
|
||||||
# Obtener orígenes de visitas por host
|
reduce_rollup(column_name, beginning, :sum, **column_dimensions)
|
||||||
values.each do |value|
|
|
||||||
column_name = "host|uri|#{column}"
|
|
||||||
column_dimensions = { host: host, uri: uri }
|
|
||||||
column_dimensions[column] = value
|
|
||||||
|
|
||||||
rollup(column_name, beginning, **column_dimensions)
|
|
||||||
reduce_rollup(column_name, beginning, :sum, **column_dimensions)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue