From d6746f0161d2bd8a0e0649375e403dcee8cf60ae Mon Sep 17 00:00:00 2001 From: Jose Celestino Date: Thu, 6 Feb 2025 01:38:52 +0000 Subject: [PATCH] [Minor] Fixed nil batch_size on default dump on statistics_dump --- lualib/rspamadm/statistics_dump.lua | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lualib/rspamadm/statistics_dump.lua b/lualib/rspamadm/statistics_dump.lua index 6bc0458501..cbd0bce142 100644 --- a/lualib/rspamadm/statistics_dump.lua +++ b/lualib/rspamadm/statistics_dump.lua @@ -42,6 +42,12 @@ parser:option "-c --config" :argname("") :default(rspamd_paths["CONFDIR"] .. "/" .. "rspamd.conf") +parser:option "-b --batch-size" + :description "Number of entries to process at once" + :argname("") + :convert(tonumber) + :default(1000) + -- Extract subcommand local dump = parser:command "dump d" :description "Dump bayes statistics" @@ -54,7 +60,7 @@ dump:mutex( dump:flag "-c --compress" :description "Compress output" dump:option "-b --batch-size" - :description "Number of entires to process at once" + :description "Number of entries to process at once" :argname("") :convert(tonumber) :default(1000) @@ -68,12 +74,12 @@ restore:argument "file" :argname "" :args "*" restore:option "-b --batch-size" - :description "Number of entires to process at once" + :description "Number of entries to process at once" :argname("") :convert(tonumber) :default(1000) restore:option "-m --mode" - :description "Number of entires to process at once" + :description "Number of entries to process at once" :argname("") :convert { ['append'] = 'append', @@ -541,4 +547,4 @@ return { aliases = { 'stat_dump', 'bayes_dump' }, handler = handler, description = parser._description -} \ No newline at end of file +} -- 2.47.3