From: Lionel B. <lio...@bo...> - 2007-08-05 18:04:48
|
Karl O. Pinc wrote the following on 05.08.2007 18:26 : > Hello, > > In my opinion sqlgrey is missing a badly needed feature, > the ability to re-initialize the database connection > upon receipt of a signal. (I suggest SIGHUP.) Hum, SIGHUP handling in Net::Server was buggy when I tried to use it, so we use SIGUSR1 with SQLgrey to make it reload its whitelists. Reconnecting to the database seems a good thing to do indeed. I'm adding it right now to both 1.6 and 1.7 branches. I'll continue using SIGUSR1 to avoid re-debugging Net::Server, think of it as "SIGHUP for SQLgrey". The reconnection will be done asynchronously (we don't want to reconnect in the middle of a query) just before processing the next mail after the SIGUSR1. Let's hope my Perl isn't too rusty after 2 years of Ruby :-) Lionel. |