commit 742507c: [Minor] Url_redirector: Fix zset trimming
Vsevolod Stakhov
vsevolod at highsecure.ru
Tue Aug 3 17:42:04 UTC 2021
Author: Vsevolod Stakhov
Date: 2021-08-03 18:37:37 +0100
URL: https://github.com/rspamd/rspamd/commit/742507c7842d1a82235974661193d649e36b8595 (HEAD -> master)
[Minor] Url_redirector: Fix zset trimming
---
src/plugins/lua/url_redirector.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/plugins/lua/url_redirector.lua b/src/plugins/lua/url_redirector.lua
index 8b60abb94..a5154c5c0 100644
--- a/src/plugins/lua/url_redirector.lua
+++ b/src/plugins/lua/url_redirector.lua
@@ -107,7 +107,7 @@ local function cache_url(task, orig_url, url, key, param)
redis_trim_cb, --callback
'ZREMRANGEBYRANK', -- command
{settings.top_urls_key, '0',
- tostring(settings.top_urls_count + 1)} -- arguments
+ tostring(-(settings.top_urls_count + 1))} -- arguments
)
if not ret then
rspamd_logger.errx(task, 'cannot trim top urls set')
More information about the Commits
mailing list