Bugzilla – Attachment 186818 Details for
Bug 40820
STOMP errors even when JobsNotificationMethod='polling'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40820: (follow-up) es_indexer_daemon.pl missed on 34070
Bug-40820-follow-up-esindexerdaemonpl-missed-on-34.patch (text/plain), 2.04 KB, created by
Kyle M Hall (khall)
on 2025-09-23 14:50:15 UTC
(
hide
)
Description:
Bug 40820: (follow-up) es_indexer_daemon.pl missed on 34070
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2025-09-23 14:50:15 UTC
Size:
2.04 KB
patch
obsolete
>From d8050a1d9eb11625d062545f8b4aada733ea285f Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Tom=C3=A1s=20Cohen=20Arazi?= <tomascohen@theke.io> >Date: Tue, 16 Sep 2025 15:13:22 -0300 >Subject: [PATCH] Bug 40820: (follow-up) es_indexer_daemon.pl missed on 34070 >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >The es_indexer_daemon.pl was missing handling for the case where >Koha::BackgroundJob->connect() returns undef without throwing >an exception (which happens when connection fails silently). > >This adds the missing warning for that case, matching the behavior >in background_jobs_worker.pl. > >Test plan: >1. Set JobsNotificationMethod to 'STOMP' >2. Configure invalid STOMP settings that cause connect() to return undef >3. Run es_indexer_daemon.pl - should show connection warning >4. Verify jobs are still processed via database polling > >Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > misc/workers/es_indexer_daemon.pl | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/misc/workers/es_indexer_daemon.pl b/misc/workers/es_indexer_daemon.pl >index 9b69fb59f7f..37d433f4ccc 100755 >--- a/misc/workers/es_indexer_daemon.pl >+++ b/misc/workers/es_indexer_daemon.pl >@@ -83,13 +83,15 @@ my $logger = Koha::Logger->get( { interface => 'worker' } ); > > my $notification_method = C4::Context->preference('JobsNotificationMethod') // 'STOMP'; > >-my $conn; >+my ( $conn, $error ); > if ( $notification_method eq 'STOMP' ) { > try { > $conn = Koha::BackgroundJob->connect; > } catch { >- warn sprintf "Cannot connect to the message broker, the jobs will be processed anyway (%s)", $_; >+ $error = sprintf "Cannot connect to the message broker, the jobs will be processed anyway (%s)", $_; > }; >+ $error ||= "Cannot connect to the message broker, the jobs will be processed anyway" unless $conn; >+ warn $error if $error; > } > > if ($conn) { >-- >2.39.5 (Apple Git-154)
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 40820
:
186506
|
186507
|
186620
|
186621
|
186816
|
186817
| 186818