Changeset

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 5569:1f8c9e27b625
children 5571:ca3c2d11823c
files mod_pubsub_feeds/README.markdown mod_pubsub_feeds/mod_pubsub_feeds.lua
diffstat 2 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mod_pubsub_feeds/README.markdown	Sun Jun 25 16:20:57 2023 +0200
+++ b/mod_pubsub_feeds/README.markdown	Sun Jun 25 16:24:12 2023 +0200
@@ -47,11 +47,11 @@
 
 # Option summary
 
-  Option                 Description
-  ---------------------- -------------------------------------------------------------------------
-  `feeds`                A list of virtual nodes to create and their associated Atom or RSS URL.
-  `feed_pull_interval`   Number of minutes between polling for new results (default 15)
-  `use_pubsubhubub`      Set to `true` to enable WebSub
+  Option                         Description
+  ------------------------------ --------------------------------------------------------------------------
+  `feeds`                        A list of virtual nodes to create and their associated Atom or RSS URL.
+  `feed_pull_interval_seconds`   Number of seconds between polling for new results (default 15 *minutes*)
+  `use_pubsubhubub`              Set to `true` to enable WebSub
 
 # Compatibility
 
--- a/mod_pubsub_feeds/mod_pubsub_feeds.lua	Sun Jun 25 16:20:57 2023 +0200
+++ b/mod_pubsub_feeds/mod_pubsub_feeds.lua	Sun Jun 25 16:24:12 2023 +0200
@@ -46,7 +46,8 @@
 local formencode = http.formencode;
 
 local feed_list = module:shared("feed_list");
-local refresh_interval = module:get_option_number("feed_pull_interval", 15) * 60;
+local legacy_refresh_interval = module:get_option_number("feed_pull_interval", 15);
+local refresh_interval = module:get_option_number("feed_pull_interval_seconds", legacy_refresh_interval*60);
 local lease_length = tostring(math.floor(module:get_option_number("feed_lease_length", 86400)));
 
 function module.load()