Software /
code /
prosody-modules
Changeset
2423:1b6027ef5191
mod_pubsub_feeds: Load config option once
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 19 Dec 2016 07:49:40 +0100 |
parents | 2422:57235bce06fc |
children | 2424:27ffa6521d4e |
files | mod_pubsub_feeds/mod_pubsub_feeds.lua |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_pubsub_feeds/mod_pubsub_feeds.lua Mon Dec 19 07:49:12 2016 +0100 +++ b/mod_pubsub_feeds/mod_pubsub_feeds.lua Mon Dec 19 07:49:40 2016 +0100 @@ -46,12 +46,11 @@ local formencode = http.formencode; local feed_list = module:shared("feed_list"); -local refresh_interval; +local refresh_interval = module:get_option_number("feed_pull_interval", 15) * 60; local lease_length = tostring(math.floor(module:get_option_number("feed_lease_length", 86400))); function module.load() local config = module:get_option("feeds", { }); - refresh_interval = module:get_option_number("feed_pull_interval", 15) * 60; local ok, nodes = pubsub.service:get_nodes(true); if not ok then nodes = {}; end local new_feed_list = {};