summaryrefslogtreecommitdiff
path: root/bot/src/rss.cpp
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-12-01 16:50:39 +0500
committerilotterytea <iltsu@alright.party>2025-12-01 16:50:39 +0500
commit0d36a1ee88fb7aedf5b33af7ac95140b002c5a64 (patch)
tree7f51f629da03376e214c7683f738b05ed4be3816 /bot/src/rss.cpp
parent71a4a8d6fc4a84029939003107bfbaad33b8c6ce (diff)
feat: rss timeout
Diffstat (limited to 'bot/src/rss.cpp')
-rw-r--r--bot/src/rss.cpp7
1 files changed, 4 insertions, 3 deletions
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<RSSChannel> channel = get_rss_channel(url);