[RefreshChannelsJob] Reduce backoff if no errors occur (#5759)

* [RefreshChannelsJob] Reduce backoff if no errors occur

* Change log level for backoff decrease
This commit is contained in:
unrealtournament
2026-06-30 10:29:03 +02:00
committed by GitHub
parent 77ad41678b
commit d61dd7205c
@@ -36,6 +36,11 @@ class Invidious::Jobs::RefreshChannelsJob < Invidious::Jobs::BaseJob
LOGGER.trace("RefreshChannelsJob: #{id} fiber : Updating DB")
Invidious::Database::Channels.update_author(id, channel.author)
if backoff > 2.minutes
backoff /= 2
LOGGER.debug("RefreshChannelsJob: #{id} fiber : decreasing backoff to #{backoff}s")
end
rescue ex
LOGGER.error("RefreshChannelsJob: #{id} : #{ex.message}")
if ex.message == "Deleted or invalid channel"