|
Line 0
Link Here
|
| 0 |
- |
1 |
#!/usr/bin/perl |
|
|
2 |
|
| 3 |
use Modern::Perl; |
| 4 |
use C4::Context; |
| 5 |
use Koha::BackgroundJob::BatchUpdateBiblio; |
| 6 |
use Koha::BackgroundJob; |
| 7 |
|
| 8 |
use Net::RabbitFoot; |
| 9 |
|
| 10 |
my $mmtid = 1; |
| 11 |
my $record_type = 'biblio'; |
| 12 |
my @record_ids = ( 1, 2, 3 ); |
| 13 |
|
| 14 |
C4::Context->_new_userenv(42); |
| 15 |
C4::Context->set_userenv( 51, 51, 42, 'koha', 'koha', 'CPL', 'CPL', 1 ); |
| 16 |
|
| 17 |
say " [x] Enqueuing BatchUpdateBiblio mmtid=$mmtid with biblionumber=" |
| 18 |
. join( ',', @record_ids ); |
| 19 |
Koha::BackgroundJob::BatchUpdateBiblio->new->enqueue( |
| 20 |
{ |
| 21 |
job_type => 'batch_record_modification', |
| 22 |
mmtid => $mmtid, |
| 23 |
record_type => $record_type, |
| 24 |
record_ids => \@record_ids, |
| 25 |
} |
| 26 |
); |