/[webpac2]/branches/Sack/run.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /branches/Sack/run.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 774 by dpavlin, Fri Nov 3 20:56:21 2006 UTC revision 790 by dpavlin, Wed Dec 13 10:08:27 2006 UTC
# Line 21  use Time::HiRes qw/time/; Line 21  use Time::HiRes qw/time/;
21  use File::Slurp;  use File::Slurp;
22  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
23  use Storable qw/dclone/;  use Storable qw/dclone/;
24    use Pod::Usage qw/pod2usage/;
25    
26  use Proc::Queue size => 1;  use Proc::Queue size => 1;
27  use POSIX ":sys_wait_h"; # imports WNOHANG  use POSIX ":sys_wait_h"; # imports WNOHANG
# Line 31  run.pl - start WebPAC indexing Line 32  run.pl - start WebPAC indexing
32    
33  B<this command will probably go away. Don't get used to it!>  B<this command will probably go away. Don't get used to it!>
34    
35  Options:  =head1 OPTIONS
36    
37  =over 4  =over 4
38    
# Line 107  my $marc_dump = 0; Line 108  my $marc_dump = 0;
108  my $parallel = 0;  my $parallel = 0;
109  my $only_links = 0;  my $only_links = 0;
110  my $merge = 0;  my $merge = 0;
111    my $help;
112    
113  my $log = _new WebPAC::Common()->_get_logger();  my $log = _new WebPAC::Common()->_get_logger();
114    
# Line 125  GetOptions( Line 127  GetOptions(
127          "parallel=i" => \$parallel,          "parallel=i" => \$parallel,
128          "only-links!" => \$only_links,          "only-links!" => \$only_links,
129          "merge" => \$merge,          "merge" => \$merge,
130            "help" => \$help,
131  );  );
132    
133    pod2usage(-verbose => 2) if ($help);
134    
135  my $config = new WebPAC::Config( path => $config_path );  my $config = new WebPAC::Config( path => $config_path );
136    
137  #print "config = ",dump($config) if ($debug);  #print "config = ",dump($config) if ($debug);
# Line 135  die "no databases in config file!\n" unl Line 140  die "no databases in config file!\n" unl
140    
141  $log->info( "-" x 79 );  $log->info( "-" x 79 );
142    
143    my $log_file = 'log';
144    
145    if (-e $log_file ) {    # && -s $log_file > 5 * 1024 * 1024) {
146            $log->info("moved old log with ", -s $log_file, " bytes to '${log_file}.old'");
147            rename $log_file, "${log_file}.old" || $log->logwarn("can't rename $log_file to ${log_file}.old: $!");
148    }
149    
150  my $estcmd_fh;  my $estcmd_fh;
151  my $estcmd_path = './estcmd-merge.sh';  my $estcmd_path = './estcmd-merge.sh';

Legend:
Removed from v.774  
changed lines
  Added in v.790

  ViewVC Help
Powered by ViewVC 1.1.26