From: Jason Stephenson <jason@sigio.com> Date: Wed, 4 Oct 2017 16:55:05 +0000 (-0400) Subject: LP 1768715: Use named arguments in function calls in pingest.pl. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=fa3af4113a3f8cff1bc2fb43dfc62af2977db78f;p=contrib%2FConifer.git LP 1768715: Use named arguments in function calls in pingest.pl. This makes it work, more or less, with Evergreen 3.0 and the changes to metabib.reingest_field_entries. Note that the new skip_display parameter is not set, so you might get collisions between the browse ingest and one of the other ingest processes if they both work on the same record at once. I will make a branch for use with Evergreen 3.0 until I upgrade to Evergreen 3.0 and merge that branch into master. Signed-off-by: Jason Stephenson <jason@sigio.com> Signed-off-by: Bill Erickson <berickxx@gmail.com> --- diff --git a/Open-ILS/src/support-scripts/pingest.pl b/Open-ILS/src/support-scripts/pingest.pl index 3d0a7ce1e5..eb5434e698 100755 --- a/Open-ILS/src/support-scripts/pingest.pl +++ b/Open-ILS/src/support-scripts/pingest.pl @@ -236,7 +236,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(?, TRUE, FALSE, TRUE)"); + my $sth = $dbh->prepare('SELECT metabib.reingest_metabib_field_entries(bib_id => ?, skip_facet => TRUE, skip_browse => FALSE, skip_search => TRUE)'); foreach (@list) { if ($sth->execute($_)) { my $crap = $sth->fetchall_arrayref(); @@ -278,7 +278,7 @@ sub reingest { sub reingest_field_entries { my $dbh = shift; my $list = shift; - my $sth = $dbh->prepare("SELECT metabib.reingest_metabib_field_entries(?, ?, TRUE, ?)"); + my $sth = $dbh->prepare('SELECT metabib.reingest_metabib_field_entries(bib_id => ?, skip_facet => ?, TRUE, skip_search => ?)'); # 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); @@ -297,7 +297,7 @@ sub reingest_attributes { my $dbh = shift; my $list = shift; my $sth = $dbh->prepare(<<END_OF_INGEST -SELECT metabib.reingest_record_attributes(id, NULL::TEXT[], marc) +SELECT metabib.reingest_record_attributes(rid => id, prmarc => marc) FROM biblio.record_entry WHERE id = ? END_OF_INGEST