Software /
code /
prosody-modules
Diff
mod_pubsub_feeds/mod_pubsub_feeds.lua @ 2423:1b6027ef5191
mod_pubsub_feeds: Load config option once
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 19 Dec 2016 07:49:40 +0100 |
parent | 2422:57235bce06fc |
child | 2645:cae371544ff5 |
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 = {};