aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-11-30 00:52:07 +0100
committerKim Alvefur <zash@zash.se>2021-11-30 00:52:07 +0100
commit4836354fd0d6c1194bb0e02248edce16e253914e (patch)
tree9fb381783b1a6f6501672b2670b2fc8b39aa763f /plugins
parent2f274d8026b201967ecb19eee721d0321878e4b4 (diff)
downloadprosody-4836354fd0d6c1194bb0e02248edce16e253914e.tar.gz
prosody-4836354fd0d6c1194bb0e02248edce16e253914e.zip
mod_http_file_share: Limit query to time since last expiry
This is probably a bad idea, as files that could not be deleted for some reason will not be tried again. I was just thinking of what the 'task' argument could be used for.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_http_file_share.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_http_file_share.lua b/plugins/mod_http_file_share.lua
index 5f3c8e5e..3daca396 100644
--- a/plugins/mod_http_file_share.lua
+++ b/plugins/mod_http_file_share.lua
@@ -457,9 +457,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(task, boundary_time)
local prune_done = prune_start();
- local iter, total = assert(uploads:find(nil, {["end"] = boundary_time; total = true}));
+ local iter, total = assert(uploads:find(nil, { ["start"] = task.last; ["end"] = boundary_time; total = true }));
if total == 0 then
module:log("info", "No expired uploaded files to prune");