changeset 793:9fd30261b0e1

mod_pubsub_feeds: Add parameter refresh_feeds() to force refresh of all feeds
author Kim Alvefur <zash@zash.se>
date Wed, 15 Aug 2012 16:34:59 +0200 (2012-08-15)
parents db27f07342d4
children 5a8fa70faa13
files mod_pubsub_feeds/mod_pubsub_feeds.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mod_pubsub_feeds/mod_pubsub_feeds.lua	Wed Aug 15 16:31:27 2012 +0200
+++ b/mod_pubsub_feeds/mod_pubsub_feeds.lua	Wed Aug 15 16:34:59 2012 +0200
@@ -138,13 +138,13 @@
 	end);
 end
 
-function refresh_feeds()
+function refresh_feeds(force)
 	local now = time();
 	--module:log("debug", "Refreshing feeds");
 	for node, item in pairs(feed_list) do
 		--FIXME Don't fetch feeds which have a subscription
 		-- Otoho, what if the subscription expires or breaks?
-		if item.last_update + refresh_interval < now then 
+		if force or item.last_update + refresh_interval < now then 
 			--module:log("debug", "checking %s", item.node);
 			fetch(item, update_entry);
 		end