5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-26 09:06:21 +00:00

Merge branch 'blazer' into panel.sutty.nl

This commit is contained in:
f 2022-04-23 19:24:59 -03:00
commit b52f36242e

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|