mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-06-28 01:48:26 +00:00
chore: add check backends interval configuration option
This commit is contained in:
parent
facd01b52e
commit
a44f37563b
@ -237,6 +237,8 @@ class Config
|
||||
property lru_max_size : Int32 = 18432 # ~512MB
|
||||
end
|
||||
|
||||
property check_backends_interval : Int32 = 30
|
||||
|
||||
{% if flag?(:linux) %}
|
||||
property reload_config_automatically : Bool = true
|
||||
{% end %}
|
||||
|
@ -5,8 +5,8 @@ class Invidious::Jobs::CheckBackend < Invidious::Jobs::BaseJob
|
||||
def begin
|
||||
loop do
|
||||
BackendInfo.check_backends
|
||||
LOGGER.info("Backend Checker: Done, sleeping for 30 seconds")
|
||||
sleep 30.seconds
|
||||
LOGGER.info("Backend Checker: Done, sleeping for #{CONFIG.check_backends_interval} seconds")
|
||||
sleep CONFIG.check_backends_interval.seconds
|
||||
Fiber.yield
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user