aboutsummaryrefslogtreecommitdiffstats
path: root/src/rspamadm
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2016-11-04 09:33:15 +0200
committerAndrew Lewis <nerf@judo.za.org>2016-11-04 09:33:15 +0200
commit46932856e743f653fe8ea6fb8b62b13d0f13fcfe (patch)
treee301422b3f3fac4fa3103d9038a6477d2bbbc0d5 /src/rspamadm
parentb8e07eb66ab91b86da7cffc3b949d2cd18415cbf (diff)
downloadrspamd-46932856e743f653fe8ea6fb8b62b13d0f13fcfe.tar.gz
rspamd-46932856e743f653fe8ea6fb8b62b13d0f13fcfe.zip
[Minor] Use single reference time in fuzzy_convert utility
Diffstat (limited to 'src/rspamadm')
-rw-r--r--src/rspamadm/fuzzy_convert.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rspamadm/fuzzy_convert.lua b/src/rspamadm/fuzzy_convert.lua
index 53a44354c..5db3c925b 100644
--- a/src/rspamadm/fuzzy_convert.lua
+++ b/src/rspamadm/fuzzy_convert.lua
@@ -148,9 +148,10 @@ return function (args, res)
return
end
+ local now = util.get_time()
for row in db:rows('SELECT id, flag, digest, value, time FROM digests') do
- local expire_in = math.floor(util:get_time() - row.time + res['expiry'])
+ local expire_in = math.floor(now - row.time + res['expiry'])
if expire_in >= 1 then
table.insert(digests, {row.digest, row.flag, row.value, expire_in})
num_batch_digests = num_batch_digests + 1