1
0
Fork 0
mirror of https://github.com/bjc/prosody.git synced 2025-04-06 22:57:38 +03:00

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.
This commit is contained in:
Kim Alvefur 2021-11-30 00:52:07 +01:00
parent 2f274d8026
commit 4836354fd0

View file

@ -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");