Changeset

12003:121c0401f83e

mod_http_file_share: Recalculate total storage usage weekly instead of daily Before mod_cron this job ran less frequently than the upload removal job. Running them at the same frequency seems wasteful somehow, plus the total should not drift away from the true value that fast.
author Kim Alvefur <zash@zash.se>
date Fri, 03 Dec 2021 09:08:23 +0100
parents 12002:cbed7d8d8f35
children 12004:a2a0e00cbd24
files plugins/mod_http_file_share.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_http_file_share.lua	Fri Dec 03 09:05:41 2021 +0100
+++ b/plugins/mod_http_file_share.lua	Fri Dec 03 09:08:23 2021 +0100
@@ -538,7 +538,7 @@
 if total_storage_limit then
 	local summary_start = module:measure("summary", "times");
 
-	module:daily("Global quota check", function()
+	module:weekly("Global quota check", function()
 		local summary_done = summary_start();
 		local iter = assert(uploads:find(nil));