From ae52de87f8a1f01ff5d3bcae96bcf11df3765c72 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 30 Sep 2024 13:52:21 -0300 Subject: [PATCH] Bug 35655: (follow-up) Fix perlcritic error Signed-off-by: Tomas Cohen Arazi --- Koha/BackgroundJob.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Koha/BackgroundJob.pm b/Koha/BackgroundJob.pm index 99fc3bb3dd..4914971dbf 100644 --- a/Koha/BackgroundJob.pm +++ b/Koha/BackgroundJob.pm @@ -63,8 +63,10 @@ Connect to the message broker using default guest/guest credential sub connect { my ( $self ); + my $notification_method = C4::Context->preference('JobsNotificationMethod') // 'STOMP'; - return undef + + return unless $notification_method eq 'STOMP'; my $hostname = $ENV{KOHA_STOMP_HOSTNAME} // 'localhost'; -- 2.39.5