session->ctx->lang_det, ctx->event_loop, FALSE);
task->resolver = ctx->resolver;
+ /* Manual learn: ensure errors are propagated (not auto-learn semantics) */
+ task->flags &= ~RSPAMD_TASK_FLAG_LEARN_AUTO;
task->s = rspamd_session_create(session->pool,
rspamd_controller_learn_fin_task,
NULL,
session->ctx->lang_det, ctx->event_loop, FALSE);
task->resolver = ctx->resolver;
+ /* Manual learn: ensure errors are propagated (not auto-learn semantics) */
+ task->flags &= ~RSPAMD_TASK_FLAG_LEARN_AUTO;
task->s = rspamd_session_create(session->pool,
rspamd_controller_learn_fin_task,
NULL,
rspamd_stat_preprocess(st_ctx, task, TRUE, spam);
if (!rspamd_stat_cache_check(st_ctx, task, classifier, spam, err)) {
- msg_debug_bayes("cache check failed, skip learning");
+ msg_debug_bayes("pre-learn checks failed, skip learning");
return RSPAMD_STAT_PROCESS_ERROR;
}
}
rspamd_stat_preprocess(st_ctx, task, TRUE, spam);
if (!rspamd_stat_cache_check(st_ctx, task, classifier, spam, err)) {
- msg_debug_bayes("cache check failed, skip learning");
+ msg_debug_bayes("pre-learn checks failed, skip learning");
return RSPAMD_STAT_PROCESS_ERROR;
}
}