mirror of
https://0xacab.org/sutty/sutty
synced 2025-02-21 11:21:50 +00:00
registrar el tiempo que pasó
This commit is contained in:
parent
aad5c82cb7
commit
c09df3b87b
1 changed files with 4 additions and 3 deletions
|
@ -10,6 +10,9 @@ class StatCollectionJob < PeriodicJob
|
||||||
def perform(site_id:, once: true)
|
def perform(site_id:, once: true)
|
||||||
@site = Site.find site_id
|
@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('builds', **options)
|
||||||
|
|
||||||
scope.rollup('space_used', **options) do |rollup|
|
scope.rollup('space_used', **options) do |rollup|
|
||||||
|
@ -31,9 +34,7 @@ class StatCollectionJob < PeriodicJob
|
||||||
current
|
current
|
||||||
end
|
end
|
||||||
|
|
||||||
# Registrar que se hicieron todas las recolecciones
|
stat.touch
|
||||||
site.stats.create! name: STAT_NAME
|
|
||||||
|
|
||||||
run_again! unless once
|
run_again! unless once
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue