summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsyeopite <70992037+syeopite@users.noreply.github.com>2021-10-20 19:12:35 +0000
committerGitHub <noreply@github.com>2021-10-20 19:12:35 +0000
commit129779a7573cab465a6975fa527ec5e9d7e0ee92 (patch)
treee0424352462b098af69278362aa767677ee4b819
parentc8a985cc77f0f1a7ac91a3465eba40f7deddbbbf (diff)
parentc6f088d6caa5a7387883d94144d761489e17cadf (diff)
downloadinvidious-129779a7573cab465a6975fa527ec5e9d7e0ee92.tar.gz
invidious-129779a7573cab465a6975fa527ec5e9d7e0ee92.tar.bz2
invidious-129779a7573cab465a6975fa527ec5e9d7e0ee92.zip
Merge pull request #2433 from iv-org/increase-channel-refresh-delay
Decrease channel refresh frequency (1 min -> 1 h)
-rw-r--r--src/invidious/jobs/refresh_channels_job.cr7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/invidious/jobs/refresh_channels_job.cr b/src/invidious/jobs/refresh_channels_job.cr
index fbe6d381..2321e964 100644
--- a/src/invidious/jobs/refresh_channels_job.cr
+++ b/src/invidious/jobs/refresh_channels_job.cr
@@ -9,7 +9,7 @@ class Invidious::Jobs::RefreshChannelsJob < Invidious::Jobs::BaseJob
lim_fibers = max_fibers
active_fibers = 0
active_channel = Channel(Bool).new
- backoff = 1.seconds
+ backoff = 2.minutes
loop do
LOGGER.debug("RefreshChannelsJob: Refreshing all channels")
@@ -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 thirty minutes")
+ sleep 30.minutes
Fiber.yield
end
end