From c09df3b87b8fa563e9225de4bed244ed4e280937 Mon Sep 17 00:00:00 2001 From: f Date: Sat, 23 Apr 2022 20:33:02 -0300 Subject: [PATCH] =?UTF-8?q?registrar=20el=20tiempo=20que=20pas=C3=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/jobs/stat_collection_job.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/jobs/stat_collection_job.rb b/app/jobs/stat_collection_job.rb index c94320d5..03dcd292 100644 --- a/app/jobs/stat_collection_job.rb +++ b/app/jobs/stat_collection_job.rb @@ -10,6 +10,9 @@ class StatCollectionJob < PeriodicJob def perform(site_id:, once: true) @site = Site.find site_id + # Registrar que se hicieron todas las recolecciones + stat = site.stats.create! name: STAT_NAME + scope.rollup('builds', **options) scope.rollup('space_used', **options) do |rollup| @@ -31,9 +34,7 @@ class StatCollectionJob < PeriodicJob current end - # Registrar que se hicieron todas las recolecciones - site.stats.create! name: STAT_NAME - + stat.touch run_again! unless once end