From 9ba3e1cdb45cc4eafc33c02e773aaee286aac551 Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Sun, 26 Sep 2021 23:31:14 +0200 Subject: [PATCH] Decrease channel refresh frequency (1 min -> 1 h) This is a temporary fix to reduce load on instances with many channels and avoid IP being flagged by Google. --- src/invidious/jobs/refresh_channels_job.cr | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/invidious/jobs/refresh_channels_job.cr b/src/invidious/jobs/refresh_channels_job.cr index fbe6d381..0adb4b5a 100644 --- a/src/invidious/jobs/refresh_channels_job.cr +++ b/src/invidious/jobs/refresh_channels_job.cr @@ -58,8 +58,9 @@ class Invidious::Jobs::RefreshChannelsJob < Invidious::Jobs::BaseJob end end - LOGGER.debug("RefreshChannelsJob: Done, sleeping for one minute") - sleep 1.minute + # TODO: make this configurable + LOGGER.debug("RefreshChannelsJob: Done, sleeping for one hour") + sleep 1.hour Fiber.yield end end