|
Lines 96-103
while (1) {
Link Here
|
| 96 |
# It could work in a first step, but then we will want to handle job that will be created from the message received |
96 |
# It could work in a first step, but then we will want to handle job that will be created from the message received |
| 97 |
my $job = Koha::BackgroundJobs->find($args->{job_id}); |
97 |
my $job = Koha::BackgroundJobs->find($args->{job_id}); |
| 98 |
|
98 |
|
|
|
99 |
$conn->ack( { frame => $frame } ); # Acknowledge the message was recieved |
| 99 |
process_job( $job, $args ); |
100 |
process_job( $job, $args ); |
| 100 |
$conn->ack( { frame => $frame } ); # FIXME depending on success? |
|
|
| 101 |
|
101 |
|
| 102 |
} else { |
102 |
} else { |
| 103 |
my $jobs = Koha::BackgroundJobs->search({ status => 'new', queue => \@queues }); |
103 |
my $jobs = Koha::BackgroundJobs->search({ status => 'new', queue => \@queues }); |
| 104 |
- |
|
|