Bugzilla – Attachment 144389 Details for
Bug 32305
Background worker doesn't check job status when received from rabbitmq
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32305: Don't process a job if its status is not 'new'
Bug-32305-Dont-process-a-job-if-its-status-is-not-.patch (text/plain), 972 bytes, created by
Martin Renvoize (ashimema)
on 2022-12-02 08:24:05 UTC
(
hide
)
Description:
Bug 32305: Don't process a job if its status is not 'new'
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-12-02 08:24:05 UTC
Size:
972 bytes
patch
obsolete
>From 97c6fd19c068d87e6702dd92289ae3ee0057d47f Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 28 Nov 2022 09:33:40 +0100 >Subject: [PATCH] Bug 32305: Don't process a job if its status is not 'new' > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/BackgroundJob.pm | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/Koha/BackgroundJob.pm b/Koha/BackgroundJob.pm >index 727bc3b2f7..341fbfcc87 100644 >--- a/Koha/BackgroundJob.pm >+++ b/Koha/BackgroundJob.pm >@@ -164,6 +164,13 @@ sub process { > > return {} if ref($self) ne 'Koha::BackgroundJob'; > >+ if ( $self->status ne 'new' ) { >+ Koha::Logger->get->warn( >+ sprintf "This background job has been processed already, or is not waiting to be processed (%s - %s)", >+ $self->id, $self->status >+ ); >+ return; >+ } > my $derived_class = $self->_derived_class; > > $args ||= {}; >-- >2.20.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 32305
:
144156
|
144278
|
144389
|
157256
|
157320
|
157321
|
157322
|
157496
|
157497
|
157500
|
157501