Mercurial > prosody-modules
comparison mod_pubsub_feeds/mod_pubsub_feeds.lua @ 5570:f93b1fc1aa31
mod_pubsub_feeds: Add new interval setting in seconds (old still works)
To match most other such settings.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 25 Jun 2023 16:24:12 +0200 |
parents | 1f8c9e27b625 |
children | ca3c2d11823c |
comparison
equal
deleted
inserted
replaced
5569:1f8c9e27b625 | 5570:f93b1fc1aa31 |
---|---|
44 local http = require "net.http"; | 44 local http = require "net.http"; |
45 local formdecode = http.formdecode; | 45 local formdecode = http.formdecode; |
46 local formencode = http.formencode; | 46 local formencode = http.formencode; |
47 | 47 |
48 local feed_list = module:shared("feed_list"); | 48 local feed_list = module:shared("feed_list"); |
49 local refresh_interval = module:get_option_number("feed_pull_interval", 15) * 60; | 49 local legacy_refresh_interval = module:get_option_number("feed_pull_interval", 15); |
50 local refresh_interval = module:get_option_number("feed_pull_interval_seconds", legacy_refresh_interval*60); | |
50 local lease_length = tostring(math.floor(module:get_option_number("feed_lease_length", 86400))); | 51 local lease_length = tostring(math.floor(module:get_option_number("feed_lease_length", 86400))); |
51 | 52 |
52 function module.load() | 53 function module.load() |
53 local config = module:get_option("feeds", { }); | 54 local config = module:get_option("feeds", { }); |
54 local ok, nodes = pubsub.service:get_nodes(true); | 55 local ok, nodes = pubsub.service:get_nodes(true); |