);
}
=head3 finish
my $jobs->finish;
Finishes multiple jobs, assumes you have handled success or failure.
=cut
sub finish {
my ($self) = @_;
while( my $job = $self->next ){
$job->update({
progress => $job->size(),
status => 'finished',
ended_on =>\'NOW()'
},{ no_triggers => 1});
=head2 Internal methods
=head3 _type
};
Koha::BackgroundJobs->search( { id => [ map { $_->id } @jobs ] } )->update( { status => 'finished', progress => 1 }, { no_triggers => 1 } );
Koha::BackgroundJobs->search( { id => [ map { $_->id } @jobs ] })->finish();
-