diff options
author | Andrew Lewis <nerf@judo.za.org> | 2016-11-04 09:33:15 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2016-11-04 09:33:15 +0200 |
commit | 46932856e743f653fe8ea6fb8b62b13d0f13fcfe (patch) | |
tree | e301422b3f3fac4fa3103d9038a6477d2bbbc0d5 /src/rspamadm | |
parent | b8e07eb66ab91b86da7cffc3b949d2cd18415cbf (diff) | |
download | rspamd-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.lua | 3 |
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 |