per-worker SQL in a Custom Function ?
paddy
paddy at PANICI.NET
Mon Jul 25 20:32:05 IST 2005
Hi,
I've been looking at the MailWatch.pm in mailwatch-1.0.1.
(I'm aware of the history, but may not have entirely understood)
I got to wondering ...
Why not just a have a persistent connection per worker?
Through trial and error, it seems to me that if I make my connection
$dbh = DBI->connect(<parameters here>)
then $dbh will be defined for the rest of the lifetime of the thread,
but that it will only $dbh->ping for the remainder of the batch.
This with only one worker: same pid for different batches, no
other workers.
I haven't yet figured out what happens at the end of the batch.
Can anyone fill me in?
Very likely its just something silly in my code.
I can post or email it if anyone is interested.
Regards,
Paddy
--
Perl 6 will give you the big knob. -- Larry Wall
------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki (http://wiki.mailscanner.info/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
Support MailScanner development - buy the book off the website!
More information about the MailScanner
mailing list