Bugzilla – Attachment 145616 Details for
Bug 32393
background job worker explodes if JSON is incorrect
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32393: (QA follow-up) Add explicit undef response in two catch blocks
Bug-32393-QA-follow-up-Add-explicit-undef-response.patch (text/plain), 1.29 KB, created by
Marcel de Rooy
on 2023-01-24 13:52:45 UTC
(
hide
)
Description:
Bug 32393: (QA follow-up) Add explicit undef response in two catch blocks
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-01-24 13:52:45 UTC
Size:
1.29 KB
patch
obsolete
>From f4df9f7233cf5ffc1995c5c7a96dc8115a62fa98 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Tue, 24 Jan 2023 13:38:41 +0000 >Subject: [PATCH] Bug 32393: (QA follow-up) Add explicit undef response in two > catch blocks >Content-Type: text/plain; charset=utf-8 > >Do not implicitly depend on last statement returning nothing. >Make it explicit. We want $args to be null here. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > misc/background_jobs_worker.pl | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/misc/background_jobs_worker.pl b/misc/background_jobs_worker.pl >index 44f7990ed4..a9a037ed76 100755 >--- a/misc/background_jobs_worker.pl >+++ b/misc/background_jobs_worker.pl >@@ -99,6 +99,7 @@ while (1) { > decode_json($body); # TODO Should this be from_json? Check utf8 flag. > } catch { > Koha::Logger->get->warn(sprintf "Frame not processed - %s", $_); >+ return; > } finally { > $conn->ack( { frame => $frame } ); > }; >@@ -124,6 +125,7 @@ while (1) { > } catch { > Koha::Logger->get->warn(sprintf "Cannot decode data for job id=%s", $job->id); > $job->status('failed')->store; >+ return; > }; > > next unless $args; >-- >2.30.2
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 32393
:
144401
|
144569
|
145064
|
145207
|
145216
|
145217
|
145596
|
145597
|
145598
|
145609
|
145610
|
145611
|
145613
|
145614
|
145615
| 145616