--- lib/Grep/Action/Search.pm 2007/02/19 16:28:00 28 +++ lib/Grep/Action/Search.pm 2007/02/19 20:07:48 30 @@ -20,6 +20,8 @@ sub take_action { my $self = shift; + my $q = $self->argument_value('content_contains') || warn "can't find content_contains"; + $self->SUPER::take_action( @_ ); my $coll = $self->result->content('search'); @@ -27,19 +29,10 @@ Jifty->log->error('result not collection but ', dump( $coll )) unless ( $coll->isa('Jifty::Collection') ); - if ($coll->count > 0) { - $self->result->message( 'Found ' . $coll->count . ' results' ); - - warn "### about to fork!"; - - if (fork) { - my $t = $coll->count; - warn "### sleeping $t s..."; - sleep $t; - Grep::Event::Result->new({ coll => $coll, item_fragment => 'title' })->publish; - exit 0; - } + my $results = $coll->count; + if ($results > 0) { + $self->result->message( "Found $results results" ); } else { $self->result->error('No local results found, wait for remote results to arrive...'); }