Mercurial > prosody-hg
comparison plugins/mod_http_file_share.lua @ 11998:99be6874340b
mod_http_file_share: Fix measuring total storage use before it was known
Passing nil to the metrics system causes errors later.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Fri, 03 Dec 2021 08:16:18 +0100 |
| parents | f9b2325f6b50 |
| children | 9d2eab56f124 |
comparison
equal
deleted
inserted
replaced
| 11997:1ea01660c79a | 11998:99be6874340b |
|---|---|
| 76 end | 76 end |
| 77 | 77 |
| 78 module:hook_global("stats-update", function () | 78 module:hook_global("stats-update", function () |
| 79 measure_upload_cache_size(upload_cache:count()); | 79 measure_upload_cache_size(upload_cache:count()); |
| 80 measure_quota_cache_size(quota_cache:count()); | 80 measure_quota_cache_size(quota_cache:count()); |
| 81 if total_storage_limit then | 81 if total_storage_limit and total_storage_usage then |
| 82 measure_total_storage_usage(total_storage_usage); | 82 measure_total_storage_usage(total_storage_usage); |
| 83 end | 83 end |
| 84 end); | 84 end); |
| 85 | 85 |
| 86 local buckets = {}; | 86 local buckets = {}; |
