Lines 90-103
unless (@queues) {
Link Here
|
90 |
push @queues, 'default'; |
90 |
push @queues, 'default'; |
91 |
} |
91 |
} |
92 |
|
92 |
|
|
|
93 |
my $notification_method = C4::Context->preference('JobsNotificationMethod') // 'STOMP'; |
94 |
|
93 |
my ( $conn, $error ); |
95 |
my ( $conn, $error ); |
94 |
try { |
96 |
if ( $notification_method eq 'STOMP' ) { |
95 |
$conn = Koha::BackgroundJob->connect; |
97 |
try { |
96 |
} catch { |
98 |
$conn = Koha::BackgroundJob->connect; |
97 |
$error = sprintf "Cannot connect to the message broker, the jobs will be processed anyway (%s)", $_; |
99 |
} catch { |
98 |
}; |
100 |
$error = sprintf "Cannot connect to the message broker, the jobs will be processed anyway (%s)", $_; |
99 |
$error ||= "Cannot connect to the message broker, the jobs will be processed anyway" unless $conn; |
101 |
}; |
100 |
warn $error if $error; |
102 |
$error ||= "Cannot connect to the message broker, the jobs will be processed anyway" unless $conn; |
|
|
103 |
warn $error if $error; |
104 |
} |
101 |
|
105 |
|
102 |
my $pm = Parallel::ForkManager->new($max_processes); |
106 |
my $pm = Parallel::ForkManager->new($max_processes); |
103 |
|
107 |
|