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' } )->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", $args->{job_id} ); |
134 |
next; |
135 |
next; |
135 |
} |
136 |
} |
136 |
|
137 |
|
137 |
- |
|
|