From dfab62ce48ff1d2227d77c2fc61f7a4ea8da1988 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9ry=20Mathieu=20=28Mathius=29?= Date: Tue, 22 Feb 2022 00:46:26 +0100 Subject: [PATCH] Rename new property to channel_refresh_interval Follow indications : https://github.com/iv-org/invidious/pull/2915#discussion_r811373503 --- config/config.example.yml | 2 +- docker-compose.yml | 2 +- src/invidious/config.cr | 2 +- src/invidious/jobs/refresh_channels_job.cr | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/config.example.yml b/config/config.example.yml index 5d4cea28..9519f34a 100644 --- a/config/config.example.yml +++ b/config/config.example.yml @@ -320,7 +320,7 @@ channel_threads: 1 ## Accepted values: a valid time interval (hours:min:seconds) ## Default: 00:30:00 ## -channel_refresh_time: 00:30:00 +channel_refresh_interval: 00:30:00 ## ## Forcefully dump and re-download the entire list of uploaded diff --git a/docker-compose.yml b/docker-compose.yml index 964bb702..ab35a496 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,7 +25,7 @@ services: INVIDIOUS_CONFIG: | log_level: Info channel_threads: 1 - channel_refresh_time: 00:30:00 + channel_refresh_interval: 00:30:00 check_tables: true feed_threads: 1 db: diff --git a/src/invidious/config.cr b/src/invidious/config.cr index 9ffd2cd8..fc24c1e7 100644 --- a/src/invidious/config.cr +++ b/src/invidious/config.cr @@ -58,7 +58,7 @@ class Config property channel_threads : Int32 = 1 # Number of threads to use for crawling videos from channels (for updating subscriptions) @[YAML::Field(converter: TimeSpanConverter)] - property channel_refresh_time : Time::Span = 30.minutes # Time between two jobs for crawling videos from channels + property channel_refresh_interval : Time::Span = 30.minutes # Time between two jobs for crawling videos from channels property feed_threads : Int32 = 1 # Number of threads to use for updating feeds property output : String = "STDOUT" # Log file path or STDOUT property log_level : LogLevel = LogLevel::Info # Default log level, valid YAML values are ints and strings, see src/invidious/helpers/logger.cr diff --git a/src/invidious/jobs/refresh_channels_job.cr b/src/invidious/jobs/refresh_channels_job.cr index 3e04d1cd..92681408 100644 --- a/src/invidious/jobs/refresh_channels_job.cr +++ b/src/invidious/jobs/refresh_channels_job.cr @@ -58,8 +58,8 @@ class Invidious::Jobs::RefreshChannelsJob < Invidious::Jobs::BaseJob end end - LOGGER.debug("RefreshChannelsJob: Done, sleeping for #{CONFIG.channel_refresh_time}") - sleep CONFIG.channel_refresh_time + LOGGER.debug("RefreshChannelsJob: Done, sleeping for #{CONFIG.channel_refresh_interval}") + sleep CONFIG.channel_refresh_interval Fiber.yield end end