|
Lines 19-24
package Koha::Sitemapper;
Link Here
|
| 19 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
19 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
| 20 |
|
20 |
|
| 21 |
use Modern::Perl; |
21 |
use Modern::Perl; |
|
|
22 |
use Try::Tiny; |
| 22 |
use Moo; |
23 |
use Moo; |
| 23 |
|
24 |
|
| 24 |
use Koha::Biblios; |
25 |
use Koha::Biblios; |
|
Lines 57-69
sub run {
Link Here
|
| 57 |
say "Creation of Sitemap files in '" . $self->dir . "' directory" |
58 |
say "Creation of Sitemap files in '" . $self->dir . "' directory" |
| 58 |
if $self->verbose; |
59 |
if $self->verbose; |
| 59 |
|
60 |
|
| 60 |
$self->writer( Koha::Sitemapper::Writer->new( sitemapper => $self ) ); |
61 |
try { |
| 61 |
my $rs = Koha::Biblios->search( $filter, { columns => [ qw/biblionumber timestamp/ ] }); |
62 |
$self->writer( Koha::Sitemapper::Writer->new( sitemapper => $self ) ); |
|
|
63 |
my $rs = Koha::Biblios->search( $filter, { columns => [ qw/biblionumber timestamp/ ] }); |
| 62 |
|
64 |
|
| 63 |
while ( $self->process($rs) ) { |
65 |
while ( $self->process($rs) ) { |
| 64 |
say "..... ", $self->count |
66 |
say "..... ", $self->count |
| 65 |
if $self->verbose && $self->count % 10000 == 0; |
67 |
if $self->verbose && $self->count % 10000 == 0; |
|
|
68 |
} |
| 66 |
} |
69 |
} |
|
|
70 |
catch { |
| 71 |
if ( $_->isa('DBIx::Class::Exception') ) { |
| 72 |
warn $_->{msg}; |
| 73 |
} |
| 74 |
}; |
| 67 |
} |
75 |
} |
| 68 |
|
76 |
|
| 69 |
|
77 |
|
| 70 |
- |
|
|