From 1aec0e7aa567f5b28ecee79b724f7f8642738fba Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 26 Oct 2016 10:23:35 -0400 Subject: [PATCH] JBAS-1437 BS search mod bibs once Signed-off-by: Bill Erickson --- KCLS/backstage/process-backstage-files.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/KCLS/backstage/process-backstage-files.pl b/KCLS/backstage/process-backstage-files.pl index 27d96dd553..bf1aebb878 100755 --- a/KCLS/backstage/process-backstage-files.pl +++ b/KCLS/backstage/process-backstage-files.pl @@ -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'); -- 2.11.0