|
From: Eric A. <de...@us...> - 2004-03-25 05:54:52
|
Update of /cvsroot/sprawler/sprawler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2943 Modified Files: indexer.pl Log Message: - changed indexer output to a more clean format, now that the indexer is "settling" down a bit. Less verbose, but still tells the story. Index: indexer.pl =================================================================== RCS file: /cvsroot/sprawler/sprawler/indexer.pl,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** indexer.pl 25 Mar 2004 04:40:35 -0000 1.25 --- indexer.pl 25 Mar 2004 05:44:03 -0000 1.26 *************** *** 128,143 **** if (@urls) { #print "indexing urls\n"; foreach $url (@urls) { ! #print "Indexing $url\n"; $client->indexer($url); $client->flush_db($url); $client->remove_url($url); }; ! ! print "Sending indexes\n"; opendir(INDEX_PATH,"$index_path"); @files=grep {! /^\./} readdir(INDEX_PATH); #my $socket=$client->connect($hostname); foreach my $file (@files) { if($file =~ /[a-f0-9]{32}\.db/i) { $filetosend=$file; --- 128,151 ---- if (@urls) { #print "indexing urls\n"; + $totalurls=@urls; + $| = 1; + $k=0; foreach $url (@urls) { ! print "\rIndexing url $k of $totalurls"; $client->indexer($url); $client->flush_db($url); $client->remove_url($url); + $k++; }; ! print " -> Done.\n"; ! opendir(INDEX_PATH,"$index_path"); @files=grep {! /^\./} readdir(INDEX_PATH); #my $socket=$client->connect($hostname); + my $totalfiles=@files; + $| = 1; + $j = 0; foreach my $file (@files) { + print "\rSending index $j of $totalfiles"; if($file =~ /[a-f0-9]{32}\.db/i) { $filetosend=$file; *************** *** 147,151 **** --- 155,162 ---- $socket->close; } + $j++; } + print " -> Done.\n"; + $| = 0; |