diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-09-16 19:18:23 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-09-16 19:18:23 +0400 |
commit | 18e0c770b951c5d8a1269b3829b73a416fc261fe (patch) | |
tree | 31ab1e9eee734251a883b0e9409f7983fedd940d /src/controller.c | |
parent | e2d78f30503d3f02eec9925f2e222b7b1493f1ad (diff) | |
download | rspamd-18e0c770b951c5d8a1269b3829b73a416fc261fe.tar.gz rspamd-18e0c770b951c5d8a1269b3829b73a416fc261fe.zip |
* Fix shared usage of statfiles
* Add invalidation of statfiles in case of learning, so now statfiles
are invalidated in about a minute after learning
* This should fix shared usage of statfile pool by several processes
Diffstat (limited to 'src/controller.c')
-rw-r--r-- | src/controller.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/controller.c b/src/controller.c index bbf50d646..2f1473540 100644 --- a/src/controller.c +++ b/src/controller.c @@ -870,6 +870,7 @@ controller_read_socket (f_str_t * in, void *arg) maybe_write_binlog (session->learn_classifier, st, statfile, tokens); msg_info ("learn success for message <%s>, for statfile: %s, sum weight: %.2f", task->message_id, session->learn_symbol, sum); + statfile_pool_plan_invalidate (session->worker->srv->statfile_pool, DEFAULT_STATFILE_INVALIDATE_TIME, DEFAULT_STATFILE_INVALIDATE_JITTER); free_task (task, FALSE); i = rspamd_snprintf (out_buf, sizeof (out_buf), "learn ok, sum weight: %.2f" CRLF, sum); if (!rspamd_dispatcher_write (session->dispatcher, out_buf, i, FALSE, FALSE)) { |