Can receive a process without XML format
This commit is contained in:
parent
d346848b90
commit
488c2bbbb8
@ -67,6 +67,26 @@ sub do_work ($$$@)
|
||||
return $subref->($given_args, $args);
|
||||
}
|
||||
|
||||
sub register_no_parse ($$;$)
|
||||
{
|
||||
my $funcname = shift;
|
||||
my $subref = shift;
|
||||
my $given_arg = shift;
|
||||
|
||||
my $worker = Gearman::Worker->new;
|
||||
|
||||
$worker->job_servers('gearmand:4730');
|
||||
$worker->register_function($funcname => sub { return $subref->($given_arg, $_[0]{argref}); });
|
||||
|
||||
# Disable exit on warning or error
|
||||
$ACU::Log::fatal_warn = 0;
|
||||
$ACU::Log::fatal_error = 0;
|
||||
|
||||
log DEBUG, "$funcname registered";
|
||||
|
||||
$worker->work while 1;
|
||||
}
|
||||
|
||||
sub register ($$;$$)
|
||||
{
|
||||
my $funcname = shift;
|
||||
|
Reference in New Issue
Block a user