[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/acqui.simple processz3950queue,1.3.2.5,1.3.2.6
From: |
Steve Tonnesen |
Subject: |
[Koha-cvs] CVS: koha/acqui.simple processz3950queue,1.3.2.5,1.3.2.6 |
Date: |
Mon, 18 Nov 2002 13:47:51 -0800 |
Update of /cvsroot/koha/koha/acqui.simple
In directory sc8-pr-cvs1:/tmp/cvs-serv22713
Modified Files:
Tag: rel-1-2
processz3950queue
Log Message:
Fix for database connection problem when several forks are active at once.
This resulted in queries that appeared to be permanentlyly stalled, but, in
fact, were never getting run.
Index: processz3950queue
===================================================================
RCS file: /cvsroot/koha/koha/acqui.simple/processz3950queue,v
retrieving revision 1.3.2.5
retrieving revision 1.3.2.6
diff -C2 -r1.3.2.5 -r1.3.2.6
*** processz3950queue 3 Sep 2002 21:15:35 -0000 1.3.2.5
--- processz3950queue 18 Nov 2002 21:47:49 -0000 1.3.2.6
***************
*** 5,8 ****
--- 5,9 ----
use C4::Acquisitions;
use C4::Biblio;
+ use C4::Context;
use C4::Output;
use Net::Z3950;
***************
*** 30,34 ****
}
! my $dbh=C4Connect;
my $sth=$dbh->prepare("update z3950results set active=0");
--- 31,35 ----
}
! my $dbh=C4::Context->dbh();
my $sth=$dbh->prepare("update z3950results set active=0");
***************
*** 59,62 ****
--- 60,64 ----
if ($forkcounter<12) {
my $now=time();
+ my $dbh=C4::Context->dbh();
$stk=$dbh->prepare("select
id,server,startdate,enddate,numrecords,active from z3950results where
queryid=$id");
($stk->execute) || (next);
***************
*** 100,107 ****
$forkcounter++;
} else {
! #$sth->finish;
! #$sti->finish;
! #$dbh->disconnect;
! my $dbi=C4Connect;
my ($name, $server, $database, $user, $password) =
split(/\//, $serverinfo, 5);
$server=~/(.*)\:(\d+)/;
--- 102,106 ----
$forkcounter++;
} else {
! my $dbi=C4::Context->dbh();
my ($name, $server, $database, $user, $password) =
split(/\//, $serverinfo, 5);
$server=~/(.*)\:(\d+)/;
***************
*** 218,222 ****
$stj->execute;
eval {$stj->finish};
- $dbi->disconnect;
print " $server done.\n";
exit;
--- 217,220 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/acqui.simple processz3950queue,1.3.2.5,1.3.2.6,
Steve Tonnesen <=
- Prev by Date:
[Koha-cvs] CVS: koha/admin koha2marclinks.pl,1.2,1.3
- Next by Date:
[Koha-cvs] CVS: koha detail.pl,1.16,1.17 MARCdetail.pl,1.6,1.7 request.pl,1.17,1.18 search.pl,1.22,1.23
- Previous by thread:
[Koha-cvs] CVS: koha/admin koha2marclinks.pl,1.2,1.3
- Next by thread:
[Koha-cvs] CVS: koha detail.pl,1.16,1.17 MARCdetail.pl,1.6,1.7 request.pl,1.17,1.18 search.pl,1.22,1.23
- Index(es):