5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-06-02 07:44:16 +00:00

actualizar todo el intervalo

This commit is contained in:
f 2022-04-23 19:24:06 -03:00
parent f94ece78cf
commit 7cbc48d45b

View file

@ -36,8 +36,10 @@ class UriCollectionJob < PeriodicJob
# Reducir las estadísticas calculadas aplicando un rollup sobre el
# intervalo más amplio.
Stat::INTERVALS.reduce do |previous, current|
beginning_of_this_interval = beginning_of_interval.try(:"beginning_of_#{current}")
Rollup.where(name: 'host|uri', interval: previous)
.where('time >= ?', beginning_of_interval)
.where('time >= ?', beginning_of_this_interval)
.where_dimensions(host: hostname, uri: uri)
.group("dimensions->'host'", "dimensions->'uri'")
.rollup('host|uri', interval: current, update: true) do |rollup|