version 1.28, 2001/04/02 14:42:26
|
version 1.30, 2001/04/02 20:16:31
|
Line 23 sub wanted {
|
Line 23 sub wanted {
|
push(@metalist,"$dir/$_"); |
push(@metalist,"$dir/$_"); |
} |
} |
|
|
|
{ |
|
my $dbh; |
|
unless ( |
|
$dbh = DBI->connect("DBI:mysql:loncapa","www","123",{ RaiseError =>0,PrintError=>0}) |
|
) { |
|
print "Cannot connect to database!\n"; |
|
exit; |
|
} |
|
else { |
|
$dbh->disconnect; |
|
} |
|
} |
$childmaxattempts=10; |
$childmaxattempts=10; |
$run =0;#running counter to generate the query-id |
$run =0;#running counter to generate the query-id |
|
|
Line 193 sub make_new_child {
|
Line 204 sub make_new_child {
|
unless ( |
unless ( |
$dbh = DBI->connect("DBI:mysql:loncapa","www","123",{ RaiseError =>0,PrintError=>0}) |
$dbh = DBI->connect("DBI:mysql:loncapa","www","123",{ RaiseError =>0,PrintError=>0}) |
) { |
) { |
my $st=120+int(rand(240)); |
sleep(10+int(rand(20))); |
&logthis("<font color=blue>WARNING: Couldn't connect to database ($st secs): $@</font>"); |
&logthis("<font color=blue>WARNING: Couldn't connect to database ($st secs): $@</font>"); |
print "database handle error\n"; |
print "database handle error\n"; |
sleep($st); |
|
exit; |
exit; |
|
|
}; |
}; |