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> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> [EDIT] Removed queue from query at MQ side. Discussed on IRC. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> (cherry picked from commit709dabb7e8
) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> (cherry picked from commit17560ba443
) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This commit is contained in:
parent
45643468fd
commit
48f32b355f
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue