Software /
code /
prosody
Changeset
11992:876e1b6d6ae4
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 30 Nov 2021 00:52:07 +0100 |
parents | 11991:bef2a59b00d1 |
children | 11993:aa60f4353001 |
files | plugins/mod_http_file_share.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_http_file_share.lua Mon Nov 22 19:07:56 2021 +0100 +++ b/plugins/mod_http_file_share.lua Tue Nov 30 00:52:07 2021 +0100 @@ -457,9 +457,9 @@ 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");