From 0d36a1ee88fb7aedf5b33af7ac95140b002c5a64 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Mon, 1 Dec 2025 16:50:39 +0500 Subject: feat: rss timeout --- bot/src/rss.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bot/src/rss.cpp') diff --git a/bot/src/rss.cpp b/bot/src/rss.cpp index 6c4b06d..cc802a1 100644 --- a/bot/src/rss.cpp +++ b/bot/src/rss.cpp @@ -57,7 +57,7 @@ namespace bot { } void RSSListener::run() { - if (!this->configuration.url.rssbridge.has_value()) { + if (!this->configuration.rss.bridge.has_value()) { log::error("RSSListener", "RSS Bridge is not set!"); return; } @@ -65,7 +65,8 @@ namespace bot { while (true) { this->add_channels(); this->check_channels(); - std::this_thread::sleep_for(std::chrono::seconds(60)); + std::this_thread::sleep_for( + std::chrono::seconds(this->configuration.rss.timeout)); } } @@ -142,7 +143,7 @@ namespace bot { std::string url = useRSSBridge - ? fmt::format(*this->configuration.url.rssbridge, bridge, name) + ? fmt::format(*this->configuration.rss.bridge, bridge, name) : name; std::optional channel = get_rss_channel(url); -- cgit v1.2.3