projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make sure DXCron::spawn records output
[spider.git]
/
perl
/
DXCron.pm
diff --git
a/perl/DXCron.pm
b/perl/DXCron.pm
index e90865f385d989217b459494bf3b47644504ddc5..f9a4f07ea12585ab62b30389b1c4734d341fa2eb 100644
(file)
--- a/
perl/DXCron.pm
+++ b/
perl/DXCron.pm
@@
-247,7
+247,7
@@
sub spawn
my $fc = Mojo::IOLoop::ForkCall->new;
$fc->run(
sub {my @res = `$line`; return @res},
my $fc = Mojo::IOLoop::ForkCall->new;
$fc->run(
sub {my @res = `$line`; return @res},
-
undef
,
+
[]
,
sub {
my ($fc, $err, @res) = @_;
if (defined $err) {
sub {
my ($fc, $err, @res) = @_;
if (defined $err) {
@@
-255,7
+255,10
@@
sub spawn
dbg($s);
return;
}
dbg($s);
return;
}
- dbg("DXCron::spawn: $_") for @res;
+ for (@res) {
+ chomp;
+ dbg("DXCron::spawn: $_") if isdbg("cron");
+ }
}
);
}
}
);
}