* Don't wait for sa-learn
@ 2006-02-18 13:40 Magnus Henoch
2006-03-20 19:57 ` Ted Zlatanov
0 siblings, 1 reply; 4+ messages in thread
From: Magnus Henoch @ 2006-02-18 13:40 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 227 bytes --]
I use spamassassin for exit processing of spam and ham messages in my
mail groups. This takes a bit of time, during which I can't use Emacs
for anything else. Here is a patch that makes Gnus not wait for
sa-learn to finish:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 286 bytes --]
--- orig/lisp/spam.el
+++ mod/lisp/spam.el
@@ -2679,7 +2679,7 @@
(apply 'call-process-region
(point-min) (point-max)
spam-sa-learn-path
- nil nil nil "--mbox"
+ nil 0 nil "--mbox"
(if spam-sa-learn-rebuild
(list action)
`("--no-rebuild" ,action)))))))
[-- Attachment #3: Type: text/plain, Size: 8 bytes --]
Magnus
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Don't wait for sa-learn
2006-02-18 13:40 Don't wait for sa-learn Magnus Henoch
@ 2006-03-20 19:57 ` Ted Zlatanov
2006-03-20 21:23 ` Magnus Henoch
0 siblings, 1 reply; 4+ messages in thread
From: Ted Zlatanov @ 2006-03-20 19:57 UTC (permalink / raw)
On 18 Feb 2006, mange@freemail.hu wrote:
> I use spamassassin for exit processing of spam and ham messages in my
> mail groups. This takes a bit of time, during which I can't use Emacs
> for anything else. Here is a patch that makes Gnus not wait for
> sa-learn to finish:
> --- orig/lisp/spam.el
> +++ mod/lisp/spam.el
>>> -2679,7 +2679,7 @@
> (apply 'call-process-region
> (point-min) (point-max)
> spam-sa-learn-path
> - nil nil nil "--mbox"
> + nil 0 nil "--mbox"
> (if spam-sa-learn-rebuild
> (list action)
> `("--no-rebuild" ,action)))))))
I don't know if this is a good idea. If you submit multiple jobs at
once, does sa-learn do the right thing? I use a version heavily
customized by my ISP, so I don't know if the vanilla SpamAssassin will
work.
Ted
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Don't wait for sa-learn
2006-03-20 19:57 ` Ted Zlatanov
@ 2006-03-20 21:23 ` Magnus Henoch
2006-03-20 21:43 ` Ted Zlatanov
0 siblings, 1 reply; 4+ messages in thread
From: Magnus Henoch @ 2006-03-20 21:23 UTC (permalink / raw)
"Ted Zlatanov" <tzz@lifelogs.com> writes:
> I don't know if this is a good idea. If you submit multiple jobs at
> once, does sa-learn do the right thing? I use a version heavily
> customized by my ISP, so I don't know if the vanilla SpamAssassin will
> work.
Some source diving tells me that it tries to acquire a lock on the
file, and fails after ten retries (one second between each), so it
should be safe.
Magnus
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Don't wait for sa-learn
2006-03-20 21:23 ` Magnus Henoch
@ 2006-03-20 21:43 ` Ted Zlatanov
0 siblings, 0 replies; 4+ messages in thread
From: Ted Zlatanov @ 2006-03-20 21:43 UTC (permalink / raw)
On 20 Mar 2006, mange@freemail.hu wrote:
> "Ted Zlatanov" <tzz@lifelogs.com> writes:
>
>> I don't know if this is a good idea. If you submit multiple jobs at
>> once, does sa-learn do the right thing? I use a version heavily
>> customized by my ISP, so I don't know if the vanilla SpamAssassin will
>> work.
>
> Some source diving tells me that it tries to acquire a lock on the
> file, and fails after ten retries (one second between each), so it
> should be safe.
That seems like a bad situation to me, because the sa-learn run has
the potential to fail silently if the first run is longer than 10
seconds. Maybe we need to set up a job queue. That may be hard to
implement, although it will be generally useful.
I'm OK with adding a variable instead, spam-train-in-background, which
is nil by default but can be turned on for specific backends.
Any opinions?
Ted
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-03-20 21:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-18 13:40 Don't wait for sa-learn Magnus Henoch
2006-03-20 19:57 ` Ted Zlatanov
2006-03-20 21:23 ` Magnus Henoch
2006-03-20 21:43 ` Ted Zlatanov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).