# HG changeset patch # User Kim Alvefur # Date 1687703052 -7200 # Node ID f93b1fc1aa31cf066aa122a34f828a536c7988ce # Parent 1f8c9e27b625df63e42d22ca2e38dd1685ec4f1a mod_pubsub_feeds: Add new interval setting in seconds (old still works) To match most other such settings. diff -r 1f8c9e27b625 -r f93b1fc1aa31 mod_pubsub_feeds/README.markdown --- 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 diff -r 1f8c9e27b625 -r f93b1fc1aa31 mod_pubsub_feeds/mod_pubsub_feeds.lua --- 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()