From 42635373017bab50a000919617cc6510e0b5604a Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 30 Nov 2023 10:14:17 +0000 Subject: luacheckrc, mod_http_file_share: Update for module API change (once->on_ready) --- .luacheckrc | 2 +- plugins/mod_http_file_share.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.luacheckrc b/.luacheckrc index 7614ec1d..6eb4c526 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -95,7 +95,7 @@ files["plugins/"] = { "module.may", "module.measure", "module.metric", - "module.once", + "module.on_ready", "module.open_store", "module.provides", "module.remove_item", diff --git a/plugins/mod_http_file_share.lua b/plugins/mod_http_file_share.lua index b00bf1f9..718b4d71 100644 --- a/plugins/mod_http_file_share.lua +++ b/plugins/mod_http_file_share.lua @@ -79,7 +79,7 @@ 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:once(function () +module:on_ready(function () local total, err = persist_stats:get(nil, "total"); if not err then total_storage_usage = tonumber(total) or 0; -- cgit v1.2.3