Browse Source

[Minor] Rename method name

tags/2.0
Vsevolod Stakhov 4 years ago
parent
commit
701a711049
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      conf/statistic.conf
  2. 1
    1
      lualib/lua_bayes_learn.lua

+ 1
- 1
conf/statistic.conf View File

@@ -41,7 +41,7 @@ classifier "bayes" {
symbol = "BAYES_SPAM";
spam = true;
}
learn_condition = "return require("lua_bayes_learn").autolearn"
learn_condition = "return require("lua_bayes_learn").can_learn"

.include(try=true; priority=1) "$LOCAL_CONFDIR/local.d/classifier-bayes.conf"
.include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/classifier-bayes.conf"

+ 1
- 1
lualib/lua_bayes_learn.lua View File

@@ -18,7 +18,7 @@ limitations under the License.

local exports = {}

exports.autolearn = function(task, is_spam, is_unlearn)
exports.can_learn = function(task, is_spam, is_unlearn)
local learn_type = task:get_request_header('Learn-Type')

if not (learn_type and tostring(learn_type) == 'bulk') then

Loading…
Cancel
Save