commit 2ec4b53: [Minor] Replies: Use milliseconds resolution for expiration

Vsevolod Stakhov vsevolod at highsecure.ru
Fri Apr 24 14:14:08 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-04-24 12:57:42 +0100
URL: https://github.com/rspamd/rspamd/commit/2ec4b534771308528390c753b9886ba5ebfcb07e

[Minor] Replies: Use milliseconds resolution for expiration

---
 src/plugins/lua/replies.lua | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/plugins/lua/replies.lua b/src/plugins/lua/replies.lua
index 6c3459b4f..330049464 100644
--- a/src/plugins/lua/replies.lua
+++ b/src/plugins/lua/replies.lua
@@ -158,8 +158,8 @@ local function replies_set(task)
         key, -- hash key
         true, -- is write
         redis_set_cb, --callback
-        'SETEX', -- command
-        {key, tostring(math.floor(settings['expire'])), value:lower()} -- arguments
+        'PSETEX', -- command
+        {key, tostring(math.floor(settings['expire'] * 1000)), value:lower()} -- arguments
     )
     if not ret then
       rspamd_logger.errx(task, "redis request wasn't scheduled")


More information about the Commits mailing list