}
sub process_outstanding {
my $jobs = Koha::BackgroundJobs->search({ status => 'new', queue => 'elastic_index' });
my $jobs = Koha::BackgroundJobs->search({ status => 'new', type => 'update_elastic_index' });
while ( my $job = $jobs->next ) {
commit($job);
-