Lines 98-104
my $dbh = C4::Context->dbh;
Link Here
|
98 |
$dbh->{AutoCommit} = 0; |
98 |
$dbh->{AutoCommit} = 0; |
99 |
|
99 |
|
100 |
my $num_bibs_processed = 0; |
100 |
my $num_bibs_processed = 0; |
101 |
my $num_bibs_error = 0; |
101 |
my $num_bibs_updated = 0; |
|
|
102 |
my $num_bibs_error = 0; |
102 |
|
103 |
|
103 |
my $starttime = time(); |
104 |
my $starttime = time(); |
104 |
|
105 |
|
Lines 169-181
sub process_query {
Link Here
|
169 |
my $ret; |
170 |
my $ret; |
170 |
if ( $incremental && $totalissues > 0 ) { |
171 |
if ( $incremental && $totalissues > 0 ) { |
171 |
$ret = UpdateTotalIssues( $biblionumber, $totalissues, undef, 1 ); |
172 |
$ret = UpdateTotalIssues( $biblionumber, $totalissues, undef, 1 ); |
172 |
} |
173 |
} else { |
173 |
else { |
|
|
174 |
$ret = UpdateTotalIssues( $biblionumber, 0, $totalissues, 1 ); |
174 |
$ret = UpdateTotalIssues( $biblionumber, 0, $totalissues, 1 ); |
175 |
} |
175 |
} |
176 |
unless ($ret) { |
176 |
if ( $ret == -1 ) { |
177 |
print "Error while processing bib $biblionumber\n" if $verbose; |
177 |
print "Error while processing bib $biblionumber\n" if $verbose; |
178 |
$num_bibs_error++; |
178 |
$num_bibs_error++; |
|
|
179 |
} elsif ( $ret == 1 ) { |
180 |
$num_bibs_updated++; |
179 |
} |
181 |
} |
180 |
} |
182 |
} |
181 |
if ( not $test_only and ( $num_bibs_processed % $commit ) == 0 ) { |
183 |
if ( not $test_only and ( $num_bibs_processed % $commit ) == 0 ) { |
Lines 199-205
Update total issues count script report
Link Here
|
199 |
Run started at: $starttime |
201 |
Run started at: $starttime |
200 |
Run ended at: $endtime |
202 |
Run ended at: $endtime |
201 |
Total run time: $totaltime ms |
203 |
Total run time: $totaltime ms |
202 |
Number of bibs modified: $num_bibs_processed |
204 |
Number of bibs processed: $num_bibs_processed |
|
|
205 |
Number of bibs modified: $num_bibs_updated |
203 |
Number of bibs with error: $num_bibs_error |
206 |
Number of bibs with error: $num_bibs_error |
204 |
_SUMMARY_ |
207 |
_SUMMARY_ |
205 |
$summary .= "\n**** Ran in test mode only ****\n" if $test_only; |
208 |
$summary .= "\n**** Ran in test mode only ****\n" if $test_only; |
206 |
- |
|
|