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
|
property lru_max_size : Int32 = 18432 # ~512MB
|
||||||
end
|
end
|
||||||
|
|
||||||
|
property check_backends_interval : Int32 = 30
|
||||||
|
|
||||||
{% if flag?(:linux) %}
|
{% if flag?(:linux) %}
|
||||||
property reload_config_automatically : Bool = true
|
property reload_config_automatically : Bool = true
|
||||||
{% end %}
|
{% end %}
|
||||||
|
|
|
@ -5,8 +5,8 @@ class Invidious::Jobs::CheckBackend < Invidious::Jobs::BaseJob
|
||||||
def begin
|
def begin
|
||||||
loop do
|
loop do
|
||||||
BackendInfo.check_backends
|
BackendInfo.check_backends
|
||||||
LOGGER.info("Backend Checker: Done, sleeping for 30 seconds")
|
LOGGER.info("Backend Checker: Done, sleeping for #{CONFIG.check_backends_interval} seconds")
|
||||||
sleep 30.seconds
|
sleep CONFIG.check_backends_interval.seconds
|
||||||
Fiber.yield
|
Fiber.yield
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue