chore: add check backends interval configuration option
This commit is contained in:
parent
facd01b52e
commit
a44f37563b
2 changed files with 4 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue