Bugzilla – Attachment 144278 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]
[ALTERNATIVE-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), 909 bytes, created by
Jonathan Druart
on 2022-11-28 08:35:26 UTC
(
hide
)
Description:
[ALTERNATIVE-PATCH] Bug 32305: Don't process a job if its status is not 'new'
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-11-28 08:35:26 UTC
Size:
909 bytes
patch
obsolete
>From b4f1cd3ce9f3c26e55403ec0fe6349fbd08e93db 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' > >--- > Koha/BackgroundJob.pm | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/Koha/BackgroundJob.pm b/Koha/BackgroundJob.pm >index 727bc3b2f7b..341fbfcc87d 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.25.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