aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-09-14 15:33:39 +0200
committerKim Alvefur <zash@zash.se>2021-09-14 15:33:39 +0200
commit72e0ff88baa4a2988b2203bc9a58ed02cc5c9959 (patch)
treebfc58d82f244ca72c824d580e68edb59e7953621 /plugins
parent5940c38b24841927496ee2fca485b6951c2d37b4 (diff)
downloadprosody-72e0ff88baa4a2988b2203bc9a58ed02cc5c9959.tar.gz
prosody-72e0ff88baa4a2988b2203bc9a58ed02cc5c9959.zip
mod_http_file_share: Fix measuring how long periodic task take
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_http_file_share.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/mod_http_file_share.lua b/plugins/mod_http_file_share.lua
index ddcc6c71..55b24b91 100644
--- a/plugins/mod_http_file_share.lua
+++ b/plugins/mod_http_file_share.lua
@@ -448,8 +448,10 @@ if expiry >= 0 and not external_base_url then
wait();
end
+ local prune_start = module:measure("prune", "times");
+
local reaper_task = async.runner(function(boundary_time)
- local prune_done = module:measure("prune", "times");
+ local prune_done = prune_start();
local iter, total = assert(uploads:find(nil, {["end"] = boundary_time; total = true}));
if total == 0 then
@@ -534,8 +536,10 @@ end
if total_storage_limit then
local async = require "util.async";
+ local summary_start = module:measure("summary", "times");
+
local summarizer_task = async.runner(function()
- local summary_done = module:measure("summary", "times");
+ local summary_done = summary_start();
local iter = assert(uploads:find(nil));
local count, sum = 0, 0;