@@ -, +, @@ mode [WARN] Job 5 not found, or has wrong status/queue main:: /usr/share/koha/misc/workers/background_jobs_worker.pl (134) --- misc/workers/background_jobs_worker.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --- a/misc/workers/background_jobs_worker.pl +++ a/misc/workers/background_jobs_worker.pl @@ -127,10 +127,11 @@ 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 => \@queues } )->next; - unless ( $job ) { - Koha::Logger->get({ interface => 'worker' })->warn(sprintf "No job found for id=%s", $args->{job_id}); + unless( $job ) { + Koha::Logger->get( { interface => 'worker' } ) + ->warn( sprintf "Job %s not found, or has wrong status/queue", $args->{job_id} ); next; } --