diff options
author | Andrew Lewis <nerf@judo.za.org> | 2017-06-02 16:11:31 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2017-06-02 16:11:31 +0200 |
commit | 865633cdcbbc3e3cba52b38dc6562bb40a909c87 (patch) | |
tree | 39f810b9291ab472a1378101371ff8bc6744f02d /src/plugins/lua/metadata_exporter.lua | |
parent | c1184c7823b41ee51750d7551403bbd9499a71ff (diff) | |
download | rspamd-865633cdcbbc3e3cba52b38dc6562bb40a909c87.tar.gz rspamd-865633cdcbbc3e3cba52b38dc6562bb40a909c87.zip |
[Minor] Metadata exporter: score should be number
Diffstat (limited to 'src/plugins/lua/metadata_exporter.lua')
-rw-r--r-- | src/plugins/lua/metadata_exporter.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/lua/metadata_exporter.lua b/src/plugins/lua/metadata_exporter.lua index c4fb5fd03..416f03cab 100644 --- a/src/plugins/lua/metadata_exporter.lua +++ b/src/plugins/lua/metadata_exporter.lua @@ -26,6 +26,7 @@ local rspamd_http = require "rspamd_http" local rspamd_tcp = require "rspamd_tcp" local rspamd_util = require "rspamd_util" local rspamd_logger = require "rspamd_logger" +local lutil = require "lua_util" local ucl = require "ucl" local E = {} local N = 'metadata_exporter' @@ -69,7 +70,7 @@ local function get_general_metadata(task, flatten, no_content) r.user = task:get_user() or 'unknown' r.qid = task:get_queue_id() or 'unknown' r.action = task:get_metric_action('default') - r.score = string.format('%.2f', task:get_metric_score('default')[1]) + r.score = lutil.round(task:get_metric_score('default')[1], 2) local rcpt = task:get_recipients('smtp') if rcpt then local l = {} |