From 1a31ac261ac063bd225f241339679af20ea98e6a Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 10 Apr 2025 18:32:01 +0000 Subject: [PATCH] Bug 39605: Resubmit failed ES background jobs This patch adds a resubmission of an indexing chunk that fails as a new background job To test: 0 - Have KTD using ES 1 - Apply patch, restart all 2 - Update a record 3 - Check background jobs and confirm it worked 4 - Edit koha-conf and set ES port to 9201, restart_all 5 - Update a record 6 - Check background jobs 7 - The job should be failing and creating new jobs 8 - Edit koha-conf and fix the port, restart_all 9 - Confirm the newest job now succeeds --- misc/workers/es_indexer_daemon.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/misc/workers/es_indexer_daemon.pl b/misc/workers/es_indexer_daemon.pl index aa2f2a9db26..05ef06c911b 100755 --- a/misc/workers/es_indexer_daemon.pl +++ b/misc/workers/es_indexer_daemon.pl @@ -221,6 +221,7 @@ sub commit { $auth_indexer->update_index( \@auth_chunk ); } catch { $logger->warn( sprintf "Update of elastic index failed with: %s", $_ ); + $auth_indexer->update_index_background( \@auth_chunk, 'authorityserver' ); }; } } @@ -231,6 +232,7 @@ sub commit { $biblio_indexer->update_index( \@bib_chunk ); } catch { $logger->warn( sprintf "Update of elastic index failed with: %s", $_ ); + $biblio_indexer->update_index_background( \@bib_chunk, 'biblioserver' ); }; } } -- 2.39.5