koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/acqui.simple processz3950queue,1.3.2.7,1.3.2.8


From: Steve Tonnesen
Subject: [Koha-cvs] CVS: koha/acqui.simple processz3950queue,1.3.2.7,1.3.2.8
Date: Mon, 09 Dec 2002 09:53:12 -0800

Update of /cvsroot/koha/koha/acqui.simple
In directory sc8-pr-cvs1:/tmp/cvs-serv28779

Modified Files:
      Tag: rel-1-2
        processz3950queue 
Log Message:
Better handling of stuck z39.50 queries


Index: processz3950queue
===================================================================
RCS file: /cvsroot/koha/koha/acqui.simple/Attic/processz3950queue,v
retrieving revision 1.3.2.7
retrieving revision 1.3.2.8
diff -C2 -r1.3.2.7 -r1.3.2.8
*** processz3950queue   4 Dec 2002 17:50:10 -0000       1.3.2.7
--- processz3950queue   9 Dec 2002 17:53:10 -0000       1.3.2.8
***************
*** 124,127 ****
--- 124,128 ----
                                my $stj=$dbi->prepare("select id from 
z3950results where server=$q_serverinfo and queryid=$id");
                                $stj->execute;
+                               exit if $dbi->err;
                                ($resultsid) = $stj->fetchrow;
                            } else {
***************
*** 255,258 ****
--- 256,270 ----
        }
        sleep 10;
+       my $sth=$dbh->prepare("select id,startdate from z3950results where 
isnull(enddate)");
+       $sth->execute;
+       if ($sth->rows) {
+           $checkqueue=1;
+       }
+       my $now=time();
+       while (my ($id, $startdate) = $sth->fetchrow) {
+           if ($now-$startdate>1200) {
+               my $sti=$dbh->do("update z3950results set enddate=$now where 
id=$id");
+           }
+       }
      }
  }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]