aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-03-22 16:30:53 +0100
committerKim Alvefur <zash@zash.se>2019-03-22 16:30:53 +0100
commit1a68e66b842a4af6fe19e99f2e09044a540b404e (patch)
treef224aad4e77bc2a3543ad9aba232299321bb135c
parenta763f1f8235b4cc9633847203d3a282871ebfca4 (diff)
downloadprosody-1a68e66b842a4af6fe19e99f2e09044a540b404e.tar.gz
prosody-1a68e66b842a4af6fe19e99f2e09044a540b404e.zip
mod_storage_sql: No archive item limit by default
-rw-r--r--plugins/mod_storage_sql.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua
index 8c03da01..6b26759f 100644
--- a/plugins/mod_storage_sql.lua
+++ b/plugins/mod_storage_sql.lua
@@ -150,7 +150,7 @@ end
--- Archive store API
-local archive_item_limit = module:get_option_number("storage_archive_item_limit", 1000);
+local archive_item_limit = module:get_option_number("storage_archive_item_limit");
local archive_item_count_cache = cache.new(module:get_option("storage_archive_item_limit_cache_size", 1000));
-- luacheck: ignore 512 431/user 431/store
@@ -261,9 +261,11 @@ function archive_store:append(username, key, value, when, with)
archive_item_count_cache:set(cache_key, item_count);
end
- module:log("debug", "%s has %d items out of %d limit", username, item_count, archive_item_limit);
- if item_count >= archive_item_limit then
- return nil, "quota-limit";
+ if archive_item_limit then
+ module:log("debug", "%s has %d items out of %d limit", username, item_count, archive_item_limit);
+ if item_count >= archive_item_limit then
+ return nil, "quota-limit";
+ end
end
when = when or os.time();