Mercurial > prosody-hg
comparison plugins/mod_http_file_share.lua @ 11496:8bf632540197
mod_http_file_share: Include storage in prune time measurement
Maybe the original idea was that you would measure storage separately?
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 31 Mar 2021 09:43:05 +0200 |
| parents | 6d3f84148729 |
| children | a8cbbbb1f165 |
comparison
equal
deleted
inserted
replaced
| 11495:6d3f84148729 | 11496:8bf632540197 |
|---|---|
| 382 module:add_timer(t, done) | 382 module:add_timer(t, done) |
| 383 wait(); | 383 wait(); |
| 384 end | 384 end |
| 385 | 385 |
| 386 local reaper_task = async.runner(function(boundary_time) | 386 local reaper_task = async.runner(function(boundary_time) |
| 387 local prune_done = module:measure("prune", "times"); | |
| 387 local iter, total = assert(uploads:find(nil, {["end"] = boundary_time; total = true})); | 388 local iter, total = assert(uploads:find(nil, {["end"] = boundary_time; total = true})); |
| 388 local prune_done = module:measure("prune", "times"); | |
| 389 | 389 |
| 390 if total == 0 then | 390 if total == 0 then |
| 391 module:log("info", "No expired uploaded files to prune"); | 391 module:log("info", "No expired uploaded files to prune"); |
| 392 prune_done(); | 392 prune_done(); |
| 393 return; | 393 return; |
