From d81eb554d9cc40b2b4339fe0ae68847587c8a12f Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Wed, 4 Oct 2017 16:43:37 -0400 Subject: [PATCH] LP 1768715: Handle the skip_display option of metabib.reingest_metabib_field_entries. pingest.pl gets a --skip-display option of its own that disables the display ingest. The display ingest is also skipped in the browse ingest. Signed-off-by: Jason Stephenson Signed-off-by: Bill Erickson --- Open-ILS/src/support-scripts/pingest.pl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/support-scripts/pingest.pl b/Open-ILS/src/support-scripts/pingest.pl index ea692a5b76..4a194c8dbf 100755 --- a/Open-ILS/src/support-scripts/pingest.pl +++ b/Open-ILS/src/support-scripts/pingest.pl @@ -33,6 +33,7 @@ my $skip_browse; # Skip the browse reingest. my $skip_attrs; # Skip the record attributes reingest. my $skip_search; # Skip the search reingest. my $skip_facets; # Skip the facets reingest. +my $skip_display # Skip the display reingest. my $start_id; # start processing at this bib ID. my $end_id; # stop processing when this bib ID is reached. my $max_duration; # max processing duration in seconds @@ -58,6 +59,7 @@ GetOptions( 'skip-attrs' => \$skip_attrs, 'skip-search' => \$skip_search, 'skip-facets' => \$skip_facets, + 'skip-display' => \$skip_display, 'start-id=i' => \$start_id, 'end-id=i' => \$end_id, 'pipe' => \$opt_pipe, @@ -81,6 +83,7 @@ sub help { --skip-attrs --skip-search --skip-facets + --skip-display Skip the selected reingest component --start-id @@ -236,7 +239,7 @@ sub browse_ingest { } elsif ($pid == 0) { my $dbh = DBI->connect("DBI:Pg:database=$db_db;host=$db_host;port=$db_port;application_name=pingest", $db_user, $db_password); - my $sth = $dbh->prepare('SELECT metabib.reingest_metabib_field_entries(bib_id => ?, skip_facet => TRUE, skip_browse => FALSE, skip_search => TRUE)'); + my $sth = $dbh->prepare('SELECT metabib.reingest_metabib_field_entries(bib_id => ?, skip_facet => TRUE, skip_browse => FALSE, skip_search => TRUE, skip_display => TRUE)'); foreach (@list) { if ($sth->execute($_)) { my $crap = $sth->fetchall_arrayref(); @@ -278,10 +281,11 @@ sub reingest { sub reingest_field_entries { my $dbh = shift; my $list = shift; - my $sth = $dbh->prepare('SELECT metabib.reingest_metabib_field_entries(bib_id => ?, skip_facet => ?, skip_browse => TRUE, skip_search => ?)'); + my $sth = $dbh->prepare('SELECT metabib.reingest_metabib_field_entries(bib_id => ?, skip_facet => ?, skip_browse => TRUE, skip_search => ?, skip_display => ?)'); # Because reingest uses "skip" options we invert the logic of do variables. $sth->bind_param(2, ($skip_facets) ? 1 : 0); $sth->bind_param(3, ($skip_search) ? 1 : 0); + $sth->bind_param(4, ($skip_display) ? 1: 0); foreach (@$list) { $sth->bind_param(1, $_); if ($sth->execute()) { -- 2.43.2