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' } )->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", $args->{job_id} ); |
129 |
next; |
129 |
next; |
130 |
} |
130 |
} |
131 |
|
131 |
|
132 |
- |
|
|