LP#1279998 marc_stream_importer option no-match import; delete repairs
authorBill Erickson <berick@esilibrary.com>
Fri, 14 Feb 2014 17:40:00 +0000 (12:40 -0500)
committerBen Shum <bshum@biblio.org>
Wed, 6 Aug 2014 19:22:42 +0000 (15:22 -0400)
* Adds another command line option for --import-no-match, so that
  importing non-matching records is now optional.

* Improve vandelay response reporting to ensure that all imported
  records get cleaned up.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/support-scripts/marc_stream_importer.pl

index bdb740b..e0a2aa3 100755 (executable)
@@ -55,6 +55,7 @@ my %defaults = (
     'nodaemon'      => 0,
     'wait=i'        => 5,
     'import-by-queue' => 0,
+    'import-no-match' => 0,
     'auto-overlay-exact' => 0,
     'auto-overlay-1match' => 0,
     'auto-overlay-best-match' => 0
@@ -253,8 +254,9 @@ sub process_spool { # filename
 
 sub bib_queue_import {
     my $rec_ids = shift;
-    my $extra = {import_no_match => 1};
+    my $extra = {report_all => 1};
     $extra->{merge_profile} = $merge_profile if $merge_profile;
+    $extra->{import_no_match} = 1 if $real_opts->{'import-no-match'};
     $extra->{auto_overlay_1match} = 1 if $real_opts->{'auto-overlay-1match'};
     $extra->{auto_overlay_best_match} = 1 if $real_opts->{'auto-overlay-best-match'};