Merge pull request #2433 from iv-org/increase-channel-refresh-delay

Decrease channel refresh frequency (1 min -> 1 h)
pull/2541/head
syeopite 2021-10-20 19:12:35 +00:00 zatwierdzone przez GitHub
commit 129779a757
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 4 dodań i 3 usunięć

Wyświetl plik

@ -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