View | Details | Raw Unified | Return to bug 32305
Collapse All | Expand All

(-)a/misc/workers/es_indexer_daemon.pl (-4 / +3 lines)
Lines 122-131 while (1) { Link Here
122
122
123
        # FIXME This means we need to have create the DB entry before
123
        # FIXME This means we need to have create the DB entry before
124
        # It could work in a first step, but then we will want to handle job that will be created from the message received
124
        # It could work in a first step, but then we will want to handle job that will be created from the message received
125
        my $job = Koha::BackgroundJobs->find($args->{job_id});
125
        my $job = Koha::BackgroundJobs->search( { id => $args->{job_id}, status => 'new', queue => 'elastic_index' } )->next;
126
126
127
        unless ( $job ) {
127
        unless ($job) {
128
            $logger->warn(sprintf "No job found for id=%s", $args->{job_id});
128
            $logger->warn( sprintf "Job %s not found, or has wrong status/queue", $args->{job_id} );
129
            next;
129
            next;
130
        }
130
        }
131
131
132
- 

Return to bug 32305