|
Lines 209-215
if( !defined $LockFH ) {
Link Here
|
| 209 |
# the lockfile) |
209 |
# the lockfile) |
| 210 |
}; |
210 |
}; |
| 211 |
|
211 |
|
|
|
212 |
my $start_time = time(); |
| 212 |
if ( $verbose_logging ) { |
213 |
if ( $verbose_logging ) { |
|
|
214 |
my $pretty_time = POSIX::strftime("%H:%M:%S",$start_time); |
| 213 |
print "Zebra configuration information\n"; |
215 |
print "Zebra configuration information\n"; |
| 214 |
print "================================\n"; |
216 |
print "================================\n"; |
| 215 |
print "Zebra biblio directory = $biblioserverdir\n"; |
217 |
print "Zebra biblio directory = $biblioserverdir\n"; |
|
Lines 219-224
if ( $verbose_logging ) {
Link Here
|
| 219 |
print "BIBLIONUMBER in : $biblionumbertagfield\$$biblionumbertagsubfield\n"; |
221 |
print "BIBLIONUMBER in : $biblionumbertagfield\$$biblionumbertagsubfield\n"; |
| 220 |
print "BIBLIOITEMNUMBER in : $biblioitemnumbertagfield\$$biblioitemnumbertagsubfield\n"; |
222 |
print "BIBLIOITEMNUMBER in : $biblioitemnumbertagfield\$$biblioitemnumbertagsubfield\n"; |
| 221 |
print "================================\n"; |
223 |
print "================================\n"; |
|
|
224 |
print "Job started: $pretty_time\n"; |
| 222 |
} |
225 |
} |
| 223 |
|
226 |
|
| 224 |
my $tester = XML::LibXML->new(); |
227 |
my $tester = XML::LibXML->new(); |
|
Lines 267-272
if ($daemon_mode) {
Link Here
|
| 267 |
|
270 |
|
| 268 |
|
271 |
|
| 269 |
if ( $verbose_logging ) { |
272 |
if ( $verbose_logging ) { |
|
|
273 |
print "Indexing complete: ". pretty_time() . "\n"; |
| 270 |
print "====================\n"; |
274 |
print "====================\n"; |
| 271 |
print "CLEANING\n"; |
275 |
print "CLEANING\n"; |
| 272 |
print "====================\n"; |
276 |
print "====================\n"; |
|
Lines 826-831
sub _create_lockfile { #returns undef on failure
Link Here
|
| 826 |
return ( $fh, $dir.'/'.LOCK_FILENAME ); |
830 |
return ( $fh, $dir.'/'.LOCK_FILENAME ); |
| 827 |
} |
831 |
} |
| 828 |
|
832 |
|
|
|
833 |
sub pretty_time { |
| 834 |
use integer; |
| 835 |
my $now = time; |
| 836 |
my $elapsed = $now - $start_time; |
| 837 |
local $_ = $elapsed; |
| 838 |
my ( $d, $h, $m, $s ); |
| 839 |
$s = $_ % 60; |
| 840 |
$_ /= 60; |
| 841 |
$m = $_ % 60; |
| 842 |
$_ /= 60; |
| 843 |
$h = $_ % 24; |
| 844 |
$_ /= 24; |
| 845 |
$d = $_; |
| 846 |
|
| 847 |
my $now_pretty = POSIX::strftime("%H:%M:%S",$now); |
| 848 |
my $elapsed_pretty = $d ? "[$d:$h:$m:$s]" : $h ? "[$h:$m:$s]" : $m ? "[$m:$s]" : "[$s]"; |
| 849 |
|
| 850 |
return "$now_pretty $elapsed_pretty"; |
| 851 |
} |
| 852 |
|
| 829 |
sub print_usage { |
853 |
sub print_usage { |
| 830 |
print <<_USAGE_; |
854 |
print <<_USAGE_; |
| 831 |
$0: reindex MARC bibs and/or authorities in Zebra. |
855 |
$0: reindex MARC bibs and/or authorities in Zebra. |
| 832 |
- |
|
|