Bugzilla – Attachment 170642 Details for
Bug 35466
bulkmarcimport needs a parameter to skip indexing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35466: (follow-up) Go to next if error, add to indexing call if not
Bug-35466-follow-up-Go-to-next-if-error-add-to-ind.patch (text/plain), 2.80 KB, created by
Phil Ringnalda
on 2024-08-23 15:28:25 UTC
(
hide
)
Description:
Bug 35466: (follow-up) Go to next if error, add to indexing call if not
Filename:
MIME Type:
Creator:
Phil Ringnalda
Created:
2024-08-23 15:28:25 UTC
Size:
2.80 KB
patch
obsolete
>From fb8dbb19830b0529b8aab7eb832ea3f030488cb7 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 23 Aug 2024 13:14:58 +0000 >Subject: [PATCH] Bug 35466: (follow-up) Go to next if error, add to indexing > call if not > >Before the previous patch we were indexing with every AddAuthority/ModAuthority call and I assumed >we were also indexing during the commity, however, it appears we were not. This patch ensures we push >the record and ids into the arrays for indexing during commit. > >Additionally I add a skip to next record on error, to match biblio behaviour. >I also correct a log referring to biblios during authority importing > >Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> >--- > misc/migration_tools/bulkmarcimport.pl | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl >index 384fbbb5b3..1ef11a59ad 100755 >--- a/misc/migration_tools/bulkmarcimport.pl >+++ b/misc/migration_tools/bulkmarcimport.pl >@@ -478,6 +478,7 @@ RECORD: foreach my $record ( @{$marc_records} ) { > if ($@) { > warn "ERROR: Update authority $matched_record_id failed: $@\n"; > printlog( { id => $matched_record_id, op => "update", status => "ERROR" } ) if ($logfile); >+ next RECORD; > } else { > printlog( { id => $authid, op => "update", status => "ok" } ) if ($logfile); > } >@@ -498,6 +499,7 @@ RECORD: foreach my $record ( @{$marc_records} ) { > if ($@) { > warn "ERROR: Insert authority $originalid failed: $@\n"; > printlog( { id => $originalid, op => "insert", status => "ERROR" } ) if ($logfile); >+ next RECORD; > } else { > printlog( { id => $authid, op => "insert", status => "ok" } ) if ($logfile); > } >@@ -506,7 +508,7 @@ RECORD: foreach my $record ( @{$marc_records} ) { > printlog( > { > id => $originalid, op => "insert", >- status => "warning : biblio not in database and option -insert not enabled, skipping..." >+ status => "warning : authority not in database and option -insert not enabled, skipping..." > } > ) if ($logfile); > } >@@ -518,6 +520,8 @@ RECORD: foreach my $record ( @{$marc_records} ) { > 1 #@FIXME: Really always updated? > ); > } >+ push @search_engine_record_ids, $authid; >+ push @search_engine_records, $record; > } else { > my ( $biblioitemnumber, $itemnumbers_ref, $errors_ref, $record_id ); > >-- >2.44.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35466
:
170059
|
170060
|
170061
|
170631
|
170641
|
170642
|
172997
|
172998
|
172999
|
173000