View | Details | Raw Unified | Return to bug 40820
Collapse All | Expand All

(-)a/misc/workers/es_indexer_daemon.pl (-3 / +4 lines)
Lines 83-95 my $logger = Koha::Logger->get( { interface => 'worker' } ); Link Here
83
83
84
my $notification_method = C4::Context->preference('JobsNotificationMethod') // 'STOMP';
84
my $notification_method = C4::Context->preference('JobsNotificationMethod') // 'STOMP';
85
85
86
my $conn;
86
my ( $conn, $error );
87
if ( $notification_method eq 'STOMP' ) {
87
if ( $notification_method eq 'STOMP' ) {
88
    try {
88
    try {
89
        $conn = Koha::BackgroundJob->connect;
89
        $conn = Koha::BackgroundJob->connect;
90
    } catch {
90
    } catch {
91
        warn sprintf "Cannot connect to the message broker, the jobs will be processed anyway (%s)", $_;
91
        $error = sprintf "Cannot connect to the message broker, the jobs will be processed anyway (%s)", $_;
92
    };
92
    };
93
    $error ||= "Cannot connect to the message broker, the jobs will be processed anyway" unless $conn;
94
    warn $error if $error;
93
}
95
}
94
96
95
if ($conn) {
97
if ($conn) {
96
- 

Return to bug 40820