# HG changeset patch # User Kim Alvefur # Date 1345041299 -7200 # Node ID 9fd30261b0e1a68ca4599f5b573719a773b876f4 # Parent db27f07342d4d27edfcabd3355b1a37571affa31 mod_pubsub_feeds: Add parameter refresh_feeds() to force refresh of all feeds diff -r db27f07342d4 -r 9fd30261b0e1 mod_pubsub_feeds/mod_pubsub_feeds.lua --- 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