5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-06-02 06:24:17 +00:00

usar el último intervalo, no el que acabamos de crear

This commit is contained in:
f 2022-04-30 10:23:58 -03:00
parent ce0d2306f6
commit deb3f0f070

View file

@ -21,9 +21,10 @@ class UriCollectionJob < PeriodicJob
def perform(site_id:, once: true)
@site = Site.find site_id
# Obtener el principio del intervalo anterior
beginning = beginning_of_interval
# Recordar la última vez que se corrió la tarea
stat = site.stats.create! name: STAT_NAME
beginning = beginning_of_interval
columns = %i[http_referer geoip2_data_country_name]
# Recorremos todos los hostnames y uris posibles y luego agrupamos