Mercurial > prosody-hg
comparison plugins/mod_http_file_share.lua @ 12004:a2a0e00cbd24
mod_http_file_share: Back out 876e1b6d6ae4
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Fri, 03 Dec 2021 10:43:02 +0100 |
| parents | 121c0401f83e |
| children | 797197b8607e |
comparison
equal
deleted
inserted
replaced
| 12003:121c0401f83e | 12004:a2a0e00cbd24 |
|---|---|
| 458 wait(); | 458 wait(); |
| 459 end | 459 end |
| 460 | 460 |
| 461 local prune_start = module:measure("prune", "times"); | 461 local prune_start = module:measure("prune", "times"); |
| 462 | 462 |
| 463 module:daily("Remove expired files", function(task, boundary_time) | 463 module:daily("Remove expired files", function(_, boundary_time) |
| 464 local prune_done = prune_start(); | 464 local prune_done = prune_start(); |
| 465 local iter, total = assert(uploads:find(nil, { ["start"] = task.last; ["end"] = boundary_time; total = true })); | 465 local iter, total = assert(uploads:find(nil, {["end"] = boundary_time; total = true})); |
| 466 | 466 |
| 467 if total == 0 then | 467 if total == 0 then |
| 468 module:log("info", "No expired uploaded files to prune"); | 468 module:log("info", "No expired uploaded files to prune"); |
| 469 prune_done(); | 469 prune_done(); |
| 470 return; | 470 return; |
