X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Flog.pl;h=ec84daa0af781343767cd915409388642756a553;hb=refs%2Fheads%2Fstaging;hp=5a83d4435ac723808880d118d1fe9faef72b6bb2;hpb=0ce79a125db0acb043fceaa641d8b3a9eae71a41;p=spider.git diff --git a/cmd/show/log.pl b/cmd/show/log.pl index 5a83d443..ec84daa0 100644 --- a/cmd/show/log.pl +++ b/cmd/show/log.pl @@ -24,10 +24,10 @@ sub handle next if $from && $to > $from; } unless ($to) { - ($to) = $f =~ /^(\d+)$/o if !$to; # is it a to count? + ($to) = $f =~ /^(\d+)$/ if !$to; # is it a to count? next if $to; } - unless ($who) { + unless ($f =~ /^\d+/) { $who = $f; next if $who; } @@ -41,16 +41,6 @@ sub handle $who = $self->call; } - @out = $self->spawn_cmd(\&DXLog::print, args => [$from, $to, $main::systime, undef, $who]); - -# my $fc = Mojo::IOLoop::ForkCall->new; -# $fc->run( -# sub {my @args = @_; my @res = DXLog::print(@args); return @res}, -# [$from, $to, $main::systime, undef, $who], -# sub {my ($fc, $err, @out) = @_; delete $self->{stash}; $self->send(@out);} -# ); -# #$self->{stash} = $fc; - -# @out = DXLog::print($from, $to, $main::systime, undef, $who); - return (1, @out); + return (1, DXLog::print($from, $to, $main::systime, undef, $who)) if $self->{_nospawn}; + return (1, $self->spawn_cmd("show/log $cmdline", \&DXLog::print, args => [$from, $to, $main::systime, undef, $who])); }