From deb3dfee39b9611017f47378a0c189c04644900e Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 5 May 2022 11:07:11 -0300 Subject: [PATCH] Bug 30692: Fix progress for ES indexing tasks This patch makes the ES indexing task record progress properly. To test: 1. Have ES setup 2. Edit a record making any change that would trigger indexing 3. Go to Administration > Background jobs => FAIL: The task status is 'Finished' but progress shows '0/1'. 4. Apply this patch 5. Restart the default worker: $ koha-worker --restart kohadev 6. Repeat 2 and 3 => SUCCESS: Things work the same, but progress is '1/1' 7. Sign off :-D Signed-off-by: Tomas Cohen Arazi Signed-off-by: Martin Renvoize --- Koha/BackgroundJob/UpdateElasticIndex.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/Koha/BackgroundJob/UpdateElasticIndex.pm b/Koha/BackgroundJob/UpdateElasticIndex.pm index c2bd48aa1f..c3a77a43c1 100644 --- a/Koha/BackgroundJob/UpdateElasticIndex.pm +++ b/Koha/BackgroundJob/UpdateElasticIndex.pm @@ -79,6 +79,7 @@ sub process { } } else { + $self->step; # FIXME This is not correct if some record_ids have been skipped $report->{total_success} = scalar @record_ids; } -- 2.20.1