projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix localdata for /spider/data only files
[spider.git]
/
perl
/
DXProt.pm
diff --git
a/perl/DXProt.pm
b/perl/DXProt.pm
index 6d20b887407984956129ac06a22656078c6330a7..25d5501fef9a5342c647f8a42f2c51d0eca5ac90 100644
(file)
--- a/
perl/DXProt.pm
+++ b/
perl/DXProt.pm
@@
-254,6
+254,7
@@
sub init
$main::me->{version} = $main::version;
$main::me->{build} = $main::build;
$main::me->{do_pc9x} = 1;
$main::me->{version} = $main::version;
$main::me->{build} = $main::build;
$main::me->{do_pc9x} = 1;
+ $main::me->{hostname} = $main::clusteraddr;
$main::me->update_pc92_next($pc92_short_update_period);
$main::me->update_pc92_keepalive;
}
$main::me->update_pc92_next($pc92_short_update_period);
$main::me->update_pc92_keepalive;
}
@@
-1218,21
+1219,31
@@
sub spawn_cmd
my $fc = Mojo::IOLoop::Subprocess->new;
# just behave normally if something has set the "one-shot" _nospawn in the channel
my $fc = Mojo::IOLoop::Subprocess->new;
# just behave normally if something has set the "one-shot" _nospawn in the channel
- return ($cmdref->(@$args)) if $self->{_nospawn};
+ if ($self->{_nospawn}) {
+ eval { @out = $cmdref->(@$args); };
+ if ($@) {
+ DXDebug::dbgprintring(25);
+ push @out, DXDebug::shortmess($@);
+ }
+ return @out;
+ }
# $fc->serializer(\&encode_json);
# $fc->deserializer(\&decode_json);
$fc->run(
sub {
my $subpro = shift;
# $fc->serializer(\&encode_json);
# $fc->deserializer(\&decode_json);
$fc->run(
sub {
my $subpro = shift;
- if (isdbg('
chan
')) {
+ if (isdbg('
progress
')) {
my $s = "line: $line";
$s .= ", args: " . join(', ', @$args) if $args && @$args;
my $s = "line: $line";
$s .= ", args: " . join(', ', @$args) if $args && @$args;
+ dbg($s);
}
}
-
- my @res = $cmdref->(@$args);
-# diffms("by $call 1", $line, $t0, scalar @res) if isdbg('chan');
- return @res;
+ eval { @out = $cmdref->(@$args); };
+ if ($@) {
+ DXDebug::dbgprintring(25);
+ push @out, DXDebug::shortmess($@);
+ }
+ return @out;
},
# $args,
sub {
},
# $args,
sub {