/[Sack]/trunk/bin/sack.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/bin/sack.pl

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

revision 24 by dpavlin, Tue Sep 22 21:27:13 2009 UTC revision 25 by dpavlin, Tue Sep 22 21:38:31 2009 UTC
# Line 66  my $input = WebPAC::Input::ISI->new( Line 66  my $input = WebPAC::Input::ISI->new(
66          limit  => $limit,          limit  => $limit,
67  );  );
68    
69    our $num_records = $input->size;
70    
71  sub report {  sub report {
72          my $description = shift;          my $description = shift;
# Line 254  if ( $listen ) { Line 255  if ( $listen ) {
255    
256          while (1) {          while (1) {
257    
258                  warn "NODE $listen ready - wating for connection\n";                  warn "NODE $listen ready - path: $path offset: $offset limit: $limit #recs: $num_records\n";
259    
260                  my $client = $sock->accept();                  my $client = $sock->accept();
261    
# Line 272  if ( $listen ) { Line 273  if ( $listen ) {
273                          run_code $header[1] => $content;                          run_code $header[1] => $content;
274                          send_sock $client => freeze $out;                          send_sock $client => freeze $out;
275                  } elsif ( $header[0] eq 'info' ) {                  } elsif ( $header[0] eq 'info' ) {
276                          my $info = "$listen\t$offset\t$limit\t$path";                          my $info = "$listen\t$offset\t$limit\t$num_records\t$path";
277                          $info .= "\t" . eval $header[1] if $header[1];                          $info .= "\t" . eval $header[1] if $header[1];
278                          warn "info $info\n";                          warn "info $info\n";
279                          send_sock $client => $info;                          send_sock $client => $info;
# Line 311  __HELP__ Line 312  __HELP__
312                  send_nodes 'info' => $2;                  send_nodes 'info' => $2;
313    
314                  my @info = (                  my @info = (
315                          "node\toffset\tlimit\tpath",                          "node\toffset\tlimit\t#recs\tpath",
316                          "----\t------\t-----\t----",                          "----\t------\t-----\t-----\t----",
317                          "0\t$offset\t$limit\t$path",                          "0\t$offset\t$limit\t$num_records\t$path",
318                  );                  );
319    
320                  push @info, get_node $_ foreach @nodes;                  push @info, get_node $_ foreach @nodes;

Legend:
Removed from v.24  
changed lines
  Added in v.25

  ViewVC Help
Powered by ViewVC 1.1.26