diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-05-18 12:56:01 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-05-18 12:57:16 +0100 |
commit | 95215c625aa3d720165780f836d01227d1d3fbc8 (patch) | |
tree | 0f4264f68be690d8abe6d056598c1b4230b3d658 | |
parent | c13a45b71d7edcb692c2f1269a517bf26d471b3c (diff) | |
download | rspamd-95215c625aa3d720165780f836d01227d1d3fbc8.tar.gz rspamd-95215c625aa3d720165780f836d01227d1d3fbc8.zip |
[Fix] Allow autolearn for the controller worker
-rw-r--r-- | src/libserver/task.c | 2 | ||||
-rw-r--r-- | src/rspamd_proxy.c | 2 | ||||
-rw-r--r-- | src/worker.c | 2 |
3 files changed, 1 insertions, 5 deletions
diff --git a/src/libserver/task.c b/src/libserver/task.c index 270bb80ea..6b349d359 100644 --- a/src/libserver/task.c +++ b/src/libserver/task.c @@ -70,7 +70,7 @@ rspamd_task_new(struct rspamd_worker *worker, { struct rspamd_task *new_task; rspamd_mempool_t *task_pool; - unsigned int flags = 0; + unsigned int flags = RSPAMD_TASK_FLAG_LEARN_AUTO; if (pool == NULL) { task_pool = rspamd_mempool_new(rspamd_mempool_suggest_size(), diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c index 415d22f07..5bf1fb8f2 100644 --- a/src/rspamd_proxy.c +++ b/src/rspamd_proxy.c @@ -1887,8 +1887,6 @@ rspamd_proxy_self_scan(struct rspamd_proxy_session *session) task->fin_arg = session; task->resolver = session->ctx->resolver; - /* TODO: allow to disable autolearn in protocol */ - task->flags |= RSPAMD_TASK_FLAG_LEARN_AUTO; task->s = rspamd_session_create(task->task_pool, rspamd_proxy_task_fin, NULL, (event_finalizer_t) rspamd_task_free, task); data = rspamd_http_message_get_body(msg, &len); diff --git a/src/worker.c b/src/worker.c index 9bf27b260..150f813c9 100644 --- a/src/worker.c +++ b/src/worker.c @@ -152,8 +152,6 @@ rspamd_worker_body_handler(struct rspamd_http_connection *conn, task->http_conn = session->http_conn; task->resolver = ctx->resolver; - /* TODO: allow to disable autolearn in protocol */ - task->flags |= RSPAMD_TASK_FLAG_LEARN_AUTO; session->worker->nconns++; rspamd_mempool_add_destructor(task->task_pool, |