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

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

Return to bug 32305