luacheckrc, mod_http_file_share: Update for module API change (once->on_ready)
authorMatthew Wild <mwild1@gmail.com>
Thu, 30 Nov 2023 10:14:17 +0000
changeset 13366 11e66ad894f0
parent 13365 e20949a10118
child 13367 2738dda885bb
luacheckrc, mod_http_file_share: Update for module API change (once->on_ready)
.luacheckrc
plugins/mod_http_file_share.lua
--- a/.luacheckrc	Thu Nov 30 10:09:47 2023 +0000
+++ b/.luacheckrc	Thu Nov 30 10:14:17 2023 +0000
@@ -95,7 +95,7 @@
 		"module.may",
 		"module.measure",
 		"module.metric",
-		"module.once",
+		"module.on_ready",
 		"module.open_store",
 		"module.provides",
 		"module.remove_item",
--- a/plugins/mod_http_file_share.lua	Thu Nov 30 10:09:47 2023 +0000
+++ b/plugins/mod_http_file_share.lua	Thu Nov 30 10:14:17 2023 +0000
@@ -79,7 +79,7 @@
 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;