]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Save unix time in redis history
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 14 Mar 2017 14:39:34 +0000 (14:39 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 14 Mar 2017 14:39:50 +0000 (14:39 +0000)
src/plugins/lua/history_redis.lua

index 18cc9b5d61a86ff087e9b5fc1f154ca9342446ba..9f7046ca06fca24847338e73a4079b9f6c811d44 100644 (file)
@@ -63,6 +63,9 @@ local function normalise_results(tbl, task)
   tbl.messages = nil
   tbl.urls = nil
 
+  local seconds = task:get_timeval()['tv_sec']
+  tbl.unix_time = seconds
+
   tbl.subject = task:get_header('subject') or 'unknown'
 end