aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-02-02 22:11:53 +0100
committerKim Alvefur <zash@zash.se>2021-02-02 22:11:53 +0100
commite2ea04d9051ff03195d7d36aa4f2e4433bb75574 (patch)
tree317a4b4a3f21b34408f6b00d9fe5a03195d09f41
parent8fd4188823cf222cfe3837c939addc24941a2261 (diff)
downloadprosody-e2ea04d9051ff03195d7d36aa4f2e4433bb75574.tar.gz
prosody-e2ea04d9051ff03195d7d36aa4f2e4433bb75574.zip
mod_http_file_share: Measure how long it takes to prune expired files
-rw-r--r--plugins/mod_http_file_share.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/mod_http_file_share.lua b/plugins/mod_http_file_share.lua
index 275ebaff..9b933b25 100644
--- a/plugins/mod_http_file_share.lua
+++ b/plugins/mod_http_file_share.lua
@@ -354,9 +354,11 @@ if expiry >= 0 and not external_base_url then
local reaper_task = async.runner(function(boundary_time)
local iter, total = assert(uploads:find(nil, {["end"] = boundary_time; total = true}));
+ local prune_done = module:measure("prune", "times");
if total == 0 then
module:log("info", "No expired uploaded files to prune");
+ prune_done();
return;
end
@@ -400,6 +402,7 @@ if expiry >= 0 and not external_base_url then
module:log("error", "Problem removing metadata for deleted files: %s", err);
end
+ prune_done();
end);
module:add_timer(1, function ()