2021-10-08 21:21:09 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2021-10-26 14:33:15 +00:00
|
|
|
# Registran cuándo fue la última recolección de datos.
|
2021-10-09 18:50:38 +00:00
|
|
|
class Stat < ApplicationRecord
|
2021-10-26 14:33:15 +00:00
|
|
|
# XXX: Los intervalos van en orden de mayor especificidad a menor
|
2022-07-15 16:19:08 +00:00
|
|
|
INTERVALS = %i[day].freeze
|
2021-10-09 18:50:38 +00:00
|
|
|
RESOURCES = %i[builds space_used build_time].freeze
|
2022-04-30 20:55:53 +00:00
|
|
|
COLUMNS = %i[http_referer geoip2_data_country_name].freeze
|
2021-10-26 14:33:15 +00:00
|
|
|
|
|
|
|
belongs_to :site
|
2022-04-30 20:55:53 +00:00
|
|
|
|
|
|
|
# El intervalo por defecto
|
|
|
|
#
|
|
|
|
# @return [Symbol]
|
|
|
|
def self.default_interval
|
|
|
|
INTERVALS.first
|
|
|
|
end
|
2021-10-09 18:50:38 +00:00
|
|
|
end
|