Try a fix
This commit is contained in:
parent
d077a5933f
commit
bbde682896
@ -24,12 +24,12 @@ close $cpuinfo;
|
|||||||
|
|
||||||
our @servers = ("gearmand-srv:4730");
|
our @servers = ("gearmand-srv:4730");
|
||||||
|
|
||||||
sub add_server(@)
|
sub add_server
|
||||||
{
|
{
|
||||||
push @servers, @_;
|
push @servers, @_;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub set_servers(@)
|
sub set_servers
|
||||||
{
|
{
|
||||||
@servers = @_;
|
@servers = @_;
|
||||||
}
|
}
|
||||||
@ -139,7 +139,7 @@ sub register ($$;$$)
|
|||||||
|
|
||||||
my $worker = Gearman::Worker->new;
|
my $worker = Gearman::Worker->new;
|
||||||
|
|
||||||
log DEBUG, "Registering function $funcname on ", join(", ", @servers);
|
log INFO, "Registering function $funcname on ", join(", ", @servers);
|
||||||
|
|
||||||
$worker->job_servers( @servers );
|
$worker->job_servers( @servers );
|
||||||
$worker->register_function($funcname => sub { return do_work($subref, $given_arg, $priority, @_); });
|
$worker->register_function($funcname => sub { return do_work($subref, $given_arg, $priority, @_); });
|
||||||
|
@ -105,5 +105,5 @@ sub process
|
|||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
Process::add_server("gearman:4730");
|
Process::set_servers("gearman:4730");
|
||||||
Process::register_no_parse("get_csv", \&process);
|
Process::register_no_parse("get_csv", \&process);
|
||||||
|
Reference in New Issue
Block a user