Bugzilla – Attachment 179218 Details for
Bug 34070
background_jobs_worker.pl floods logs when it gets error frames
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34070: Display the 'jobs will be processed anyway' message from worker
Bug-34070-Display-the-jobs-will-be-processed-anywa.patch (text/plain), 1.64 KB, created by
Jonathan Druart
on 2025-03-12 15:23:33 UTC
(
hide
)
Description:
Bug 34070: Display the 'jobs will be processed anyway' message from worker
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-03-12 15:23:33 UTC
Size:
1.64 KB
patch
obsolete
>From 4d2d108f280709c699d8568ece06a7cb2b6e4f64 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 12 Mar 2025 16:20:00 +0100 >Subject: [PATCH] Bug 34070: Display the 'jobs will be processed anyway' > message from worker > >->connect does not raise an exception, so we didn't reached the catch >block. > >Adjusting the code but I am not really happy with it, but more changes >will derail the original bug > >Now we log: >Cannot connect to broker (Access refused for user 'guest') at /kohadevbox/koha/Koha/BackgroundJob.pm line 96. >Cannot connect to the message broker, the jobs will be processed anyway at /kohadevbox/koha/misc/workers/background_jobs_worker.pl line 100. > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > misc/workers/background_jobs_worker.pl | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/misc/workers/background_jobs_worker.pl b/misc/workers/background_jobs_worker.pl >index 5958f70fd2f..81e980998da 100755 >--- a/misc/workers/background_jobs_worker.pl >+++ b/misc/workers/background_jobs_worker.pl >@@ -90,12 +90,14 @@ unless (@queues) { > push @queues, 'default'; > } > >-my $conn; >+my ( $conn, $error ); > 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; > > my $pm = Parallel::ForkManager->new($max_processes); > >-- >2.34.1
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 34070
:
178068
|
179024
|
179025
|
179094
|
179095
|
179214
|
179215
|
179216
|
179217
|
179218
|
182570
|
182571
|
182572
|
182573
|
182574