Bugzilla – Attachment 157497 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.55 KB, created by
Martin Renvoize (ashimema)
on 2023-10-20 08:30:43 UTC
(
hide
)
Description:
Bug 32305: Counterpart for es_indexer_daemon.pl
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-10-20 08:30:43 UTC
Size:
1.55 KB
patch
obsolete
>From ca6e19c2c0b05534fcab14086fb75d1ed5428454 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 > >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> >--- > 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 89e3b5cb0f0..ee434afea4d 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', queue => 'elastic_index' } )->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/queue", $args->{job_id} ); > next; > } > >-- >2.41.0
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