diff options
author | Kim Alvefur <zash@zash.se> | 2021-12-04 16:48:39 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-12-04 16:48:39 +0100 |
commit | 8bef874d8f780bbe63dc4b9a5e1d27ba87c267d7 (patch) | |
tree | b149aaa73fe8535e2ae4e630e3c841c35e201dc8 /plugins/mod_http_file_share.lua | |
parent | ce345d2908c974438b5146a1187f6b83ac65cc7b (diff) | |
download | prosody-8bef874d8f780bbe63dc4b9a5e1d27ba87c267d7.tar.gz prosody-8bef874d8f780bbe63dc4b9a5e1d27ba87c267d7.zip |
mod_http_file_share: Fix to take retention time into account
It was lost in 6f4790b8deec when switching to mod_cron.
Diffstat (limited to 'plugins/mod_http_file_share.lua')
-rw-r--r-- | plugins/mod_http_file_share.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_http_file_share.lua b/plugins/mod_http_file_share.lua index 1a2a1f37..447a9ecc 100644 --- a/plugins/mod_http_file_share.lua +++ b/plugins/mod_http_file_share.lua @@ -460,8 +460,9 @@ if expiry >= 0 and not external_base_url then local prune_start = module:measure("prune", "times"); - module:daily("Remove expired files", function(_, boundary_time) + module:daily("Remove expired files", function(_, current_time) local prune_done = prune_start(); + local boundary_time = (current_time or os.time()) - expiry; local iter, total = assert(uploads:find(nil, {["end"] = boundary_time; total = true})); if total == 0 then |