]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Neural: Another fix in saving profile
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 8 Jul 2019 09:47:39 +0000 (10:47 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 8 Jul 2019 09:47:39 +0000 (10:47 +0100)
src/plugins/lua/neural.lua

index 10c1eadd4d1cfb1a571c67a250c1d9e871336ece..7b6c2fa5f81b3c1341081a5edbc9f799b0af16d2 100644 (file)
@@ -285,7 +285,7 @@ local function new_ann_profile(task, rule, set, version)
       true, -- is write
       add_cb, --callback
       'ZADD', -- command
-      {set.prefix, tostring(rspamd_util.get_time()), new_ann_profile}
+      {set.prefix, tostring(rspamd_util.get_time()), profile_serialized}
   )
 
   return profile
@@ -785,7 +785,7 @@ local function load_new_ann(rule, ev_base, set, profile, min_diff)
               true, -- is write
               rank_cb, --callback
               'ZADD', -- command
-              {set.prefix, tostring(rspamd_util.get_time()), new_ann_profile}
+              {set.prefix, tostring(rspamd_util.get_time()), profile_serialized}
           )
           rspamd_logger.infox(rspamd_config, 'loaded ANN for %s from %s; %s bytes compressed; version=%s',
               rule.prefix .. ':' .. set.name, ann_key, #ann_data, profile.version)