{
std::swap(st, other.st);
std::swap(db, other.db);
+ std::swap(loaded, other.loaded);
+ std::swap(learns_spam, other.learns_spam);
+ std::swap(learns_ham, other.learns_ham);
return *this;
}
st->classifier = cl;
st->stcf = stf;
- if (!(cl->cfg->flags & RSPAMD_FLAG_CLASSIFIER_NO_BACKEND) && bk) {
+ if (!(cl->cfg->flags & RSPAMD_FLAG_CLASSIFIER_NO_BACKEND)) {
st->backend = bk;
st->bkcf = bk->init (stat_ctx, cfg, st);
- msg_debug_config ("added backend %s for symbol %s",
+ msg_info_config ("added backend %s for symbol %s",
bk->name, stf->symbol);
}
else {
continue;
}
- if (st->backend->read_only) {
+ if (is_learn && st->backend->read_only) {
/* Read only backend, skip it */
g_ptr_array_index (task->stat_runtimes, i) = NULL;
continue;