Bugzilla – Attachment 186507 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), 1.89 KB, created by
Tomás Cohen Arazi (tcohen)
on 2025-09-16 18:36:34 UTC
(
hide
)
Description:
Bug 40820: (follow-up) es_indexer_daemon.pl missed on 34070
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2025-09-16 18:36:34 UTC
Size:
1.89 KB
patch
obsolete
>From d2b03384cb4203a78f6251872248e6313ce28b8b 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> >--- > 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 9b69fb59f7..37d433f4cc 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.51.0
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