]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Redis history: fix number of rows 1524/head
authorAndrew Lewis <nerf@judo.za.org>
Tue, 14 Mar 2017 14:42:40 +0000 (16:42 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Tue, 14 Mar 2017 14:42:40 +0000 (16:42 +0200)
src/plugins/lua/history_redis.lua

index 9f7046ca06fca24847338e73a4079b9f6c811d44..c656215d08c5efe3c66686130a5e881120559e3d 100644 (file)
@@ -110,7 +110,7 @@ local function history_save(task)
   )
 
   if ret then
-    conn:add_cmd('LTRIM', {prefix, '0', tostring(settings.nrows)})
+    conn:add_cmd('LTRIM', {prefix, '0', tostring(settings.nrows-1)})
   end
 end
 
@@ -196,4 +196,4 @@ if opts then
       handler = handle_history_request
     }
   end
-end
\ No newline at end of file
+end