diff options
author | Kim Alvefur <zash@zash.se> | 2024-11-02 23:08:28 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2024-11-02 23:08:28 +0100 |
commit | 664895700d29b70c3e84cee0a19a86c9f262e511 (patch) | |
tree | 9e6fc418347c1d740b3e4a4ec6cbbc76e754f139 | |
parent | 95dddbdea176164b4f88735148a3fb24384570ae (diff) | |
download | prosody-664895700d29b70c3e84cee0a19a86c9f262e511.tar.gz prosody-664895700d29b70c3e84cee0a19a86c9f262e511.zip |
mod_http_file_share: Revert 9c62ffbdf2aeHEADorigin/mastermaster
No, that wasn't running in a thread, but in a next tick timer.
-rw-r--r-- | plugins/mod_http_file_share.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_http_file_share.lua b/plugins/mod_http_file_share.lua index cfc647d4..48972067 100644 --- a/plugins/mod_http_file_share.lua +++ b/plugins/mod_http_file_share.lua @@ -79,12 +79,12 @@ local measure_upload_cache_size = module:measure("upload_cache", "amount"); local measure_quota_cache_size = module:measure("quota_cache", "amount"); local measure_total_storage_usage = module:measure("total_storage", "amount", { unit = "bytes" }); -module:on_ready(function () +do local total, err = persist_stats:get(nil, "total"); if not err then total_storage_usage = tonumber(total) or 0; end -end) +end module:hook_global("stats-update", function () measure_upload_cache_size(upload_cache:count()); |