Bugzilla – Attachment 157501 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: Counterpart for es_indexer_daemon.pl
Bug-32305-Counterpart-for-esindexerdaemonpl.patch (text/plain), 1.67 KB, created by
Marcel de Rooy
on 2023-10-20 09:20:24 UTC
(
hide
)
Description:
Bug 32305: Counterpart for es_indexer_daemon.pl
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-10-20 09:20:24 UTC
Size:
1.67 KB
patch
obsolete
>From c986f2a178169033a92f642bd43b22e47542924a Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 18 Oct 2023 13:58:17 +0000 >Subject: [PATCH] Bug 32305: Counterpart for es_indexer_daemon.pl >Content-Type: text/plain; charset=utf-8 > >This is a kind of copy-and-paste variant of background worker. >We probably could do better than having two scripts here ;) > >Test plan: >See former test plan. Apply it to ES indexing. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >[EDIT] Removed queue from query at MQ side. Discussed on IRC. >--- > misc/workers/es_indexer_daemon.pl | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/misc/workers/es_indexer_daemon.pl b/misc/workers/es_indexer_daemon.pl >index 89e3b5cb0f..b24d1902f3 100755 >--- a/misc/workers/es_indexer_daemon.pl >+++ b/misc/workers/es_indexer_daemon.pl >@@ -122,10 +122,10 @@ while (1) { > > # FIXME This means we need to have create the DB entry before > # It could work in a first step, but then we will want to handle job that will be created from the message received >- my $job = Koha::BackgroundJobs->find($args->{job_id}); >+ my $job = Koha::BackgroundJobs->search( { id => $args->{job_id}, status => 'new' } )->next; > >- unless ( $job ) { >- $logger->warn(sprintf "No job found for id=%s", $args->{job_id}); >+ unless ($job) { >+ $logger->warn( sprintf "Job %s not found, or has wrong status", $args->{job_id} ); > next; > } > >-- >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 32305
:
144156
|
144278
|
144389
|
157256
|
157320
|
157321
|
157322
|
157496
|
157497
|
157500
| 157501