JBAS-1437 BS search mod bibs once
authorBill Erickson <berickxx@gmail.com>
Wed, 26 Oct 2016 14:23:35 +0000 (10:23 -0400)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
KCLS/backstage/process-backstage-files.pl

index 27d96dd..bf1aebb 100755 (executable)
@@ -187,8 +187,12 @@ sub process_zip_file {
 
 # Returns ID's of bib records that have been modified since the export date.
 my @modified_bibs;
+my $mod_searched = 0;
 sub find_modified_bibs {
 
+    return if $mod_searched;
+    $mod_searched = 1;
+
     my $id_arrays = $db_handle->selectall_arrayref(<<"    SQL");
         SELECT id 
         FROM biblio.record_entry 
@@ -209,7 +213,7 @@ sub find_modified_bibs {
 sub handle_modified_bibs {
     my $marc_batch = shift;
 
-    find_modified_bibs() unless @modified_bibs;
+    find_modified_bibs();
 
     while (my $record = $marc_batch->next()) {
         my $bib_id = $record->subfield('901', 'c');