Bug 29697: Don't crash ES reindex if a record is wrong
We don't want rebuild_elasticsearch.pl to crash if a record is wrong (also fix ktd setup). Note that now the script will output an error for the problematic record, which is certainly the expected behaviour as we are doing it already for authority records. Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
25f78370c4
commit
cb8aaff8c3
1 changed files with 2 additions and 2 deletions
|
@ -145,12 +145,12 @@ sub get_all_biblios_iterator {
|
|||
while (1) {
|
||||
my $row = $rs->next();
|
||||
return if !$row;
|
||||
my $marc = $row->metadata->record({ embed_items => 1 });
|
||||
my $next = eval {
|
||||
my $marc = $row->metadata->record({ embed_items => 1 });
|
||||
$class->new($marc, $row->biblionumber);
|
||||
};
|
||||
if ($@) {
|
||||
warn "Something went wrong reading record for biblio $row->biblionumber: $@\n";
|
||||
warn sprintf "Something went wrong reading record for biblio %s: %s\n", $row->biblionumber, $@;
|
||||
next;
|
||||
}
|
||||
return $next;
|
||||
|
|
Loading…
Reference in a new issue