Bug 22892: Remove warning from rebuild_es if --processes not passed

Use of uninitialized value $processes in numeric lt (<) at
misc/search_tools/rebuild_elasticsearch.pl line 199.

We want the number of processes to be set to 1 by default, and then
assign it to $slice_count

Test plan:
Run the script with and without --processes and confirm that the warning
went away.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2019-05-12 19:46:58 -05:00 committed by Nick Clemens
parent f00d909220
commit 9bc386a98f
1 changed files with 1 additions and 1 deletions

View File

@ -138,7 +138,7 @@ _verify_index_state($Koha::SearchEngine::Elasticsearch::BIBLIOS_INDEX, $delete)
_verify_index_state($Koha::SearchEngine::Elasticsearch::AUTHORITIES_INDEX, $delete) if ($index_authorities);
my $slice_index = 0;
my $slice_count = $processes // 1;
my $slice_count = ( $processes //= 1 );
my %iterator_options;
if ($slice_count > 1) {