[open-ils-commits] [GIT] Evergreen ILS branch master updated. 39c71a13a01e89e91a91472492adef5fa8910084

Evergreen Git git at git.evergreen-ils.org
Wed Feb 20 12:19:37 EST 2019


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  39c71a13a01e89e91a91472492adef5fa8910084 (commit)
      from  306e823c8de4951ff061fd6c855de3cac77371db (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 39c71a13a01e89e91a91472492adef5fa8910084
Author: Jason Stephenson <jason at sigio.com>
Date:   Fri Jan 25 08:14:40 2019 -0500

    Lp 1813172: Option to Specify Attributes for Reingest in pingest.pl
    
    Add the --attr option to pingest.pl to specify one or more specific
    attributes to be reingested by metabib.reingest_record_attributes.
    
    Add a release note.
    
    Signed-off-by: Jason Stephenson <jason at sigio.com>
    Signed-off-by: Bill Erickson <berickxx at gmail.com>

diff --git a/Open-ILS/src/support-scripts/pingest.pl b/Open-ILS/src/support-scripts/pingest.pl
index d351cfacb5..c39981a9f4 100755
--- a/Open-ILS/src/support-scripts/pingest.pl
+++ b/Open-ILS/src/support-scripts/pingest.pl
@@ -39,6 +39,7 @@ my $end_id;       # stop processing when this bib ID is reached.
 my $max_duration; # max processing duration in seconds
 my $help;         # show help text
 my $opt_pipe;     # Read record ids from STDIN.
+my $record_attrs; # Record attributes for metabib.reingest_record_attributes.
 
 # Database connection options with defaults:
 my $db_user = $ENV{PGUSER} || 'evergreen';
@@ -64,6 +65,7 @@ GetOptions(
     'end-id=i'       => \$end_id,
     'pipe'           => \$opt_pipe,
     'max-duration=i' => \$max_duration,
+    'attr=s@'        => \$record_attrs,
     'help'           => \$help
 );
 
@@ -86,6 +88,12 @@ sub help {
     --skip-display
         Skip the selected reingest component
 
+    --attr
+        Specify a record attribute for ingest
+        This option can be used more than once to specify multiple
+        attributes to ingest.
+        This option is ignored if --skip-attrs is also given.
+
     --start-id
         Start processing at this record ID.
 
@@ -301,13 +309,14 @@ sub reingest_attributes {
     my $dbh = shift;
     my $list = shift;
     my $sth = $dbh->prepare(<<END_OF_INGEST
-SELECT metabib.reingest_record_attributes(rid := id, prmarc := marc)
+SELECT metabib.reingest_record_attributes(rid := id, prmarc := marc, pattr_list := ?)
 FROM biblio.record_entry
 WHERE id = ?
 END_OF_INGEST
     );
+    $sth->bind_param(1, $record_attrs);
     foreach (@$list) {
-        $sth->bind_param(1, $_);
+        $sth->bind_param(2, $_);
         if ($sth->execute()) {
             my $crap = $sth->fetchall_arrayref();
         } else {
diff --git a/docs/RELEASE_NOTES_NEXT/Administration/pingest-specify-record-atrributes.adoc b/docs/RELEASE_NOTES_NEXT/Administration/pingest-specify-record-atrributes.adoc
new file mode 100644
index 0000000000..2f3bf7e8de
--- /dev/null
+++ b/docs/RELEASE_NOTES_NEXT/Administration/pingest-specify-record-atrributes.adoc
@@ -0,0 +1,21 @@
+Ability to Reingest Certain Record Attributes In pingest.pl
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+An option, `--attr`, has been added to the `pingest.pl` support script
+that allows the user to specify which record attributes to reingest.
+This option is used to specify which record attribute(s) to reingest.
+It can be used one or more times to specify one or more attributes to
+ingest.  It can be omitted to reingest all record attributes.  This
+option is ignored if the `--skip-attrs` option is used.
+
+The `--attr` option is most useful after doing something specific that
+requires only a partial ingest of records.  For instance, if you add a
+new language to the `config.coded_value_map` table, you will want to
+reingest the `item_lang` attribute on all of your records.  The
+following command line will do that, and only that, ingest:
+
+----
+$ /openils/bin/pingest.pl --skip-browse --skip-search --skip-facets \
+    --skip-display --attr=item_lang
+----
+

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/src/support-scripts/pingest.pl             | 13 +++++++++++--
 .../pingest-specify-record-atrributes.adoc          | 21 +++++++++++++++++++++
 2 files changed, 32 insertions(+), 2 deletions(-)
 create mode 100644 docs/RELEASE_NOTES_NEXT/Administration/pingest-specify-record-atrributes.adoc


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list