Fix process
This commit is contained in:
parent
c9e4aa3279
commit
dbfd12ec9d
2 changed files with 18 additions and 14 deletions
|
|
@ -71,14 +71,16 @@ sub do_work ($$$@)
|
|||
return $err;
|
||||
}
|
||||
|
||||
my $ret;
|
||||
eval {
|
||||
return $subref->($given_args, $args);
|
||||
$ret = $subref->($given_args, $args);
|
||||
};
|
||||
if ($@) {
|
||||
my $err = $@;
|
||||
log ERROR, $err;
|
||||
return $err;
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
sub register_no_parse ($$;$)
|
||||
|
|
@ -92,14 +94,16 @@ sub register_no_parse ($$;$)
|
|||
$worker->job_servers('gearmand:4730');
|
||||
$worker->register_function($funcname => sub
|
||||
{
|
||||
my $ret;
|
||||
eval {
|
||||
return $subref->($given_arg, $_[0]{argref});
|
||||
$ret = $subref->($given_arg, $_[0]{argref});
|
||||
};
|
||||
if ($@) {
|
||||
my $err = $@;
|
||||
log ERROR, $err;
|
||||
return $err;
|
||||
}
|
||||
return $ret;
|
||||
});
|
||||
|
||||
# Disable exit on warning or error
|
||||
|
|
|
|||
Reference in a new issue