]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Url_redirector: Fix zset trimming
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 3 Aug 2021 17:37:37 +0000 (18:37 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 3 Aug 2021 17:37:37 +0000 (18:37 +0100)
src/plugins/lua/url_redirector.lua

index 8b60abb94a9b0a82aec68f641bc6f2fa629e4749..a5154c5c01c567d9925f11e300bc80dd9ec93e43 100644 (file)
@@ -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')