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

Evergreen Git git at git.evergreen-ils.org
Fri Sep 6 18:00:39 EDT 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  b198d0d1c37314920e83d7edce529d2cdb1214b0 (commit)
      from  0934dd5f8008bf6b10166055d90d993811c12530 (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 b198d0d1c37314920e83d7edce529d2cdb1214b0
Author: Jason Stephenson <jstephenson at cwmars.org>
Date:   Wed Apr 3 13:30:07 2019 -0400

    Lp 1811696: Add --rebuild-rmsr option to pingest.pl
    
    Add the option to rebuild the reporter.materialized_simple_record
    table to the pingest.pl support script.
    
    Add release notes.
    
    Signed-off-by: Jason Stephenson <jason at sigio.com>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/src/support-scripts/pingest.pl b/Open-ILS/src/support-scripts/pingest.pl
index c39981a9f4..b3a3e4097f 100755
--- a/Open-ILS/src/support-scripts/pingest.pl
+++ b/Open-ILS/src/support-scripts/pingest.pl
@@ -34,6 +34,7 @@ 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 $rebuild_rmsr; # Rebuild reporter.materialized_simple_record.
 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
@@ -61,6 +62,7 @@ GetOptions(
     'skip-search'    => \$skip_search,
     'skip-facets'    => \$skip_facets,
     'skip-display'   => \$skip_display,
+    'rebuild-rmsr'   => \$rebuild_rmsr,
     'start-id=i'     => \$start_id,
     'end-id=i'       => \$end_id,
     'pipe'           => \$opt_pipe,
@@ -93,6 +95,8 @@ sub help {
         This option can be used more than once to specify multiple
         attributes to ingest.
         This option is ignored if --skip-attrs is also given.
+    --rebuild-rmsr
+        Rebuild the reporter.materialized_simple_record table.
 
     --start-id
         Start processing at this record ID.
@@ -230,6 +234,9 @@ while ($count < $lists) {
     }
 }
 
+# Rebuild reporter.materialized_simple_record after the ingests.
+rmsr_rebuild() if ($rebuild_rmsr);
+
 # This subroutine forks a process to do the browse-only ingest on the
 # @blist above.  It cannot be parallelized, but can run in parrallel
 # to the other ingests.
@@ -324,3 +331,12 @@ END_OF_INGEST
         }
     }
 }
+
+# Rebuild/refresh reporter.materialized_simple_record
+sub rmsr_rebuild {
+    print("Rebuilding reporter.materialized_simple_record\n");
+    my $dbh = DBI->connect("DBI:Pg:database=$db_db;host=$db_host;port=$db_port;application_name=pingest",
+                           $db_user, $db_password);
+    $dbh->selectall_arrayref("SELECT reporter.refresh_materialized_simple_record();");
+    $dbh->disconnect();
+}
diff --git a/docs/RELEASE_NOTES_NEXT/Administration/pingest-rebuild-rmsr.adoc b/docs/RELEASE_NOTES_NEXT/Administration/pingest-rebuild-rmsr.adoc
new file mode 100644
index 0000000000..f8f858fe78
--- /dev/null
+++ b/docs/RELEASE_NOTES_NEXT/Administration/pingest-rebuild-rmsr.adoc
@@ -0,0 +1,16 @@
+--rebuild-rmsr Option Added to pingest.pl
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+An option, `--rebuild-rmsr`, has been added to the pingest.pl support
+script.  This option will rebuild the
+reporter.materialized_simple_record (rmsr) table after the ingests are
+complete.
+
+This option might prove useful if you want to rebuild the table as
+part of a larger reingest.  If all you wish to do is to rebuild the
+rmsr table, then it would be just as simple to connect to the database
+server and run the following SQL:
+
+[source,sql]
+----
+SELECT reporter.refresh_materialized_simple_record();
+----

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

Summary of changes:
 Open-ILS/src/support-scripts/pingest.pl                  | 16 ++++++++++++++++
 .../Administration/pingest-rebuild-rmsr.adoc             | 16 ++++++++++++++++
 2 files changed, 32 insertions(+)
 create mode 100644 docs/RELEASE_NOTES_NEXT/Administration/pingest-rebuild-rmsr.adoc


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list