[Spambayes] sb_server.py and SIGTERM?

Antoine Boulart a.boulart at imedia.ru
Wed Aug 25 14:31:55 CEST 2004


Hello,

any reason why sb_server doesn't seem to catch SIGTERM and shut down
properly?

I was using sb_server for a long time on a FreeBSD box and it wasn't
giving very good results, until I realised one day that every time the
machine was rebooted, the training data went back to an initial,
little-trained state!

I realised I had to use the web interface's 'save and shutdown' button
to get the server to properly quit and save its newly trained messages
to disk.

So it'd be nice if it could do the same on a reboot without requiring
manual intervention, and in the mean time I had this script which
would stop and start the server every day so that it would save its
new training data:

# shut down spambayes nicely
wget -q -O /dev/null --post-data 'how=Save+%26+shutdown' http://localhost:8880/save

# restart spambayes
sb_server.py 2>&1 >$HOME/sb_server.log &


Maybe this can help someone.

antoine





More information about the Spambayes mailing list