From 6699db838078d141cc3eaab7815b09d22d1862ec Mon Sep 17 00:00:00 2001 From: f Date: Sat, 30 Apr 2022 11:34:21 -0300 Subject: [PATCH] otra vez el mismo error de hashes acumulados hice benchmarks, generar hashes nuevos es mas rapido que duplicarlos, y eliminar las keys que no corresponden es apenas mas rapido pero con mas posibilidad de bugs --- app/jobs/uri_collection_job.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/jobs/uri_collection_job.rb b/app/jobs/uri_collection_job.rb index 196d2e50..620123db 100644 --- a/app/jobs/uri_collection_job.rb +++ b/app/jobs/uri_collection_job.rb @@ -58,10 +58,11 @@ class UriCollectionJob < PeriodicJob # Obtener orĂ­genes de visitas por host values.each do |value| column_name = "host|uri|#{column}" - dimensions[column] = value + column_dimensions = { host: host, uri: uri } + column_dimensions[column] = value - rollup(column_name, beginning, **dimensions) - reduce_rollup(column_name, beginning, **dimensions) + rollup(column_name, beginning, **column_dimensions) + reduce_rollup(column_name, beginning, **column_dimensions) end end end