[open-ils-commits] r12816 - trunk/Open-ILS/src/perlmods/OpenILS/Application (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Apr 8 00:08:10 EDT 2009


Author: dbs
Date: 2009-04-08 00:08:08 -0400 (Wed, 08 Apr 2009)
New Revision: 12816

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm
Log:
Fix open-ils.ingest.full.biblio.record_list by passing a reference to the list, rather than a scalar
Fix the return value of open-ils.ingest.full.biblio.record_list by returning a true count, rather than a sum of the processed IDs


Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm	2009-04-07 21:07:34 UTC (rev 12815)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm	2009-04-08 04:08:08 UTC (rev 12816)
@@ -371,7 +371,7 @@
     my $cstore = OpenSRF::AppSession->connect( 'open-ils.cstore' );
     $cstore->request('open-ils.cstore.transaction.begin')->gather(1);
 
-    my $r = $cstore->request( 'open-ils.cstore.direct.biblio.record_entry.search.atomic' => { id => $rec } )->gather(1);
+    my $r = $cstore->request( 'open-ils.cstore.direct.biblio.record_entry.search.atomic' => { id => \@rec } )->gather(1);
 
     $cstore->request('open-ils.cstore.transaction.rollback')->gather(1);
     $cstore->disconnect;
@@ -379,8 +379,11 @@
     return undef unless ($r and @$r);
 
     my $count = 0;
-    $count += ($self->method_lookup("open-ils.ingest.full.biblio.object")->run($_))[0] for (@$r);
-
+    for (@$r) {
+        if (($self->method_lookup("open-ils.ingest.full.biblio.object")->run($_))[0]) {
+            $count++
+        }
+    }
     return $count;
 }
 __PACKAGE__->register_method(  



More information about the open-ils-commits mailing list