diff options
Diffstat (limited to 'data')
-rw-r--r-- | data/rbot/plugins/rss.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/data/rbot/plugins/rss.rb b/data/rbot/plugins/rss.rb index 6451996d..c34e5926 100644 --- a/data/rbot/plugins/rss.rb +++ b/data/rbot/plugins/rss.rb @@ -762,10 +762,12 @@ class RSSFeedsPlugin < Plugin status[:failures] = failures
timer = nil
+ seconds = @bot.config['rss.thread_sleep']
feed.mutex.synchronize do
timer = @watch[feed.handle]
- seconds = (feed.refresh_rate || @bot.config['rss.thread_sleep']) * (failures + 1)
+ seconds = feed.refresh_rate if feed.refresh_rate
end
+ seconds *= failures + 1
seconds += seconds * (rand(100)-50)/100
debug "watcher for #{feed} going to sleep #{seconds} seconds.."
@bot.timer.reschedule(timer, seconds)
|