5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-16 08:31:41 +00:00

registrar el tiempo que pasó

This commit is contained in:
f 2022-04-23 20:33:02 -03:00
parent aad5c82cb7
commit c09df3b87b

View file

@ -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