From: Dan Scott Date: Mon, 7 Dec 2015 17:46:05 +0000 (-0500) Subject: Update to include another new RACER book X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=66acf67d3efa7e90734aa92213092c2cfe62cb64;p=contrib%2FConifer.git Update to include another new RACER book A RACER book was deleted, and a new one took its place. Thus we need to update the script so that the copies & call numbers will be trimmed from that book too. Signed-off-by: Dan Scott --- diff --git a/tools/daily-scripts/delete_ill_books.pl b/tools/daily-scripts/delete_ill_books.pl old mode 100644 new mode 100755 index 28187e6a0c..3df0864c04 --- a/tools/daily-scripts/delete_ill_books.pl +++ b/tools/daily-scripts/delete_ill_books.pl @@ -13,7 +13,7 @@ use File::Find; my ($config) = ('/openils/conf/opensrf_core.xml'); GetOptions( - "bootstrap=s" => \$config, + "bootstrap=s" => \$config, ); OpenSRF::System->bootstrap_client( config_file => $config ); @@ -35,80 +35,82 @@ delete_racer_callnumbers(); $dbh->disconnect; sub delete_racer_callnumbers { - my $select_stmt = <selectcol_arrayref($select_stmt); - print localtime() . " - found " . scalar(@$results) . " RACER book call numbers to delete:\n"; - if (scalar(@$results)) { - foreach (@$results) { - print "\t$_\n"; - } - my $stmt = $dbh->prepare($delete_stmt); - my $updates = $stmt->execute(); - $stmt = $dbh->prepare($delete_copies_stmt); - $updates = $stmt->execute(); - } + my $results = $dbh->selectcol_arrayref($select_stmt); + print localtime() . " - found " . scalar(@$results) . " RACER book call numbers to delete:\n"; + if (scalar(@$results)) { + foreach (@$results) { + print "\t$_\n"; + } + my $stmt = $dbh->prepare($delete_stmt); + my $updates = $stmt->execute(); + $stmt = $dbh->prepare($delete_copies_stmt); + $updates = $stmt->execute(); + } }