/[webpac2]/trunk/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 /trunk/run.pl

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

revision 221 by dpavlin, Mon Dec 5 17:48:23 2005 UTC revision 233 by dpavlin, Tue Dec 6 16:40:18 2005 UTC
# Line 28  my $total_rows = 0; Line 28  my $total_rows = 0;
28    
29  while (my ($database, $db_config) = each %{ $config->{databases} }) {  while (my ($database, $db_config) = each %{ $config->{databases} }) {
30    
         my $type = lc($db_config->{input}->{type});  
   
         die "I know only how to handle input type isis, not '$type'!\n" unless ($type eq 'isis');  
   
31          my $abs_path = abs_path($0);          my $abs_path = abs_path($0);
32          $abs_path =~ s#/[^/]*$#/#;          $abs_path =~ s#/[^/]*$#/#;
33    
         my $lookup = new WebPAC::Lookup(  
                 lookup_file => $db_config->{input}->{lookup},  
         );  
   
34          my $db_path = $config->{webpac}->{db_path} . '/' . $database;          my $db_path = $config->{webpac}->{db_path} . '/' . $database;
35    
   
         my $log = $lookup->_get_logger;  
         $log->info("working on $database in $db_path");  
   
36          my $db = new WebPAC::Store(          my $db = new WebPAC::Store(
37                  path => $db_path,                  path => $db_path,
38                  database => $database,                  database => $database,
39                  debug => 1,                  debug => 1,
40          );          );
41    
42            my $log = $db->_get_logger;
43            $log->info("working on $database in $db_path");
44    
45          my $est_config = $config->{hyperestraier} || $log->logdie("can't find 'hyperestraier' part in confguration");          my $est_config = $config->{hyperestraier} || $log->logdie("can't find 'hyperestraier' part in confguration");
46          $est_config->{database} = $database;          $est_config->{database} = $database;
47    
# Line 72  while (my ($database, $db_config) = each Line 63  while (my ($database, $db_config) = each
63          }          }
64    
65          foreach my $input (@inputs) {          foreach my $input (@inputs) {
66    
67                    my $type = lc($input->{type});
68    
69                    die "I know only how to handle input type isis, not '$type'!\n" unless ($type eq 'isis');
70    
71                    my $lookup = new WebPAC::Lookup(
72                            lookup_file => $input->{lookup},
73                    );
74    
75                  $log->info("working on input $input->{path} [$input->{type}]");                  $log->info("working on input $input->{path} [$input->{type}]");
76    
77                  my $isis = new WebPAC::Input::ISIS(                  my $isis = new WebPAC::Input::ISIS(

Legend:
Removed from v.221  
changed lines
  Added in v.233

  ViewVC Help
Powered by ViewVC 1.1.26