mirror of
https://github.com/iv-org/invidious.git
synced 2026-06-17 04:16:44 -05:00
[RefreshChannelsJob] Reduce backoff if no errors occur
This commit is contained in:
parent
0e0ee40cb6
commit
5db344cd6e
@ -36,6 +36,11 @@ class Invidious::Jobs::RefreshChannelsJob < Invidious::Jobs::BaseJob
|
|||||||
|
|
||||||
LOGGER.trace("RefreshChannelsJob: #{id} fiber : Updating DB")
|
LOGGER.trace("RefreshChannelsJob: #{id} fiber : Updating DB")
|
||||||
Invidious::Database::Channels.update_author(id, channel.author)
|
Invidious::Database::Channels.update_author(id, channel.author)
|
||||||
|
|
||||||
|
if backoff > 2.minutes
|
||||||
|
backoff /= 2
|
||||||
|
LOGGER.info("RefreshChannelsJob: #{id} fiber : decreasing backoff to #{backoff}s")
|
||||||
|
end
|
||||||
rescue ex
|
rescue ex
|
||||||
LOGGER.error("RefreshChannelsJob: #{id} : #{ex.message}")
|
LOGGER.error("RefreshChannelsJob: #{id} : #{ex.message}")
|
||||||
if ex.message == "Deleted or invalid channel"
|
if ex.message == "Deleted or invalid channel"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user