From deb3f0f0709bed4d586e8580cb1987722b310094 Mon Sep 17 00:00:00 2001 From: f Date: Sat, 30 Apr 2022 10:23:58 -0300 Subject: [PATCH] =?UTF-8?q?usar=20el=20=C3=BAltimo=20intervalo,=20no=20el?= =?UTF-8?q?=20que=20acabamos=20de=20crear?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/jobs/uri_collection_job.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/jobs/uri_collection_job.rb b/app/jobs/uri_collection_job.rb index 1f635997..e5105e5a 100644 --- a/app/jobs/uri_collection_job.rb +++ b/app/jobs/uri_collection_job.rb @@ -21,9 +21,10 @@ class UriCollectionJob < PeriodicJob def perform(site_id:, once: true) @site = Site.find site_id + # Obtener el principio del intervalo anterior + beginning = beginning_of_interval # Recordar la última vez que se corrió la tarea stat = site.stats.create! name: STAT_NAME - beginning = beginning_of_interval columns = %i[http_referer geoip2_data_country_name] # Recorremos todos los hostnames y uris posibles y luego agrupamos