Lines 24-31
use Try::Tiny qw( catch try );
Link Here
|
24 |
use C4::Context; |
24 |
use C4::Context; |
25 |
use Koha::DateUtils qw( dt_from_string ); |
25 |
use Koha::DateUtils qw( dt_from_string ); |
26 |
use Koha::Exceptions; |
26 |
use Koha::Exceptions; |
27 |
use Koha::BackgroundJob::BatchUpdateBiblio; |
|
|
28 |
use Koha::BackgroundJob::BatchUpdateAuthority; |
29 |
|
27 |
|
30 |
use base qw( Koha::Object ); |
28 |
use base qw( Koha::Object ); |
31 |
|
29 |
|
Lines 151-161
sub process {
Link Here
|
151 |
my ( $self, $args ) = @_; |
149 |
my ( $self, $args ) = @_; |
152 |
|
150 |
|
153 |
my $job_type = $self->type; |
151 |
my $job_type = $self->type; |
154 |
return $job_type eq 'batch_biblio_record_modification' |
152 |
|
155 |
? Koha::BackgroundJob::BatchUpdateBiblio->process($args) |
153 |
if ( $job_type eq 'batch_biblio_record_modification' ) { |
156 |
: $job_type eq 'batch_authority_record_modification' |
154 |
require Koha::BackgroundJob::BatchUpdateBiblio; |
157 |
? Koha::BackgroundJob::BatchUpdateAuthority->process($args) |
155 |
Koha::BackgroundJob::BatchUpdateBiblio->process($args) |
158 |
: Koha::Exceptions::Exception->throw('->process called without valid job_type'); |
156 |
} elsif ( $job_type eq 'batch_authority_record_modification' ) { |
|
|
157 |
require Koha::BackgroundJob::BatchUpdateAuthority; |
158 |
Koha::BackgroundJob::BatchUpdateAuthority->process($args) |
159 |
} else { |
160 |
Koha::Exceptions::Exception->throw('->process called without valid job_type'); |
161 |
} |
159 |
} |
162 |
} |
160 |
|
163 |
|
161 |
=head3 job_type |
164 |
=head3 job_type |
162 |
- |
|
|