Hi all,
I am using Gearman in one of my project.I have installed everything including the Gearman::XS module but still i am getting the following error after running the script"gearman_connection_flush:write:111" Any help is appreciate.Thanks in advance.
My script is
#!/usr/bin/perl
use FindBin qw($Bin);
use lib ("$Bin/../blib/lib", "$Bin/../blib/arch");
use Gearman::XS qw(:constants);
use Gearman::XS::Worker;
my $worker = Gearman::XS::Worker->new;
my $ret = $worker->add_server('192.168.35.71',4730);
if ($ret != GEARMAN_SUCCESS)
{
printf(STDERR "%s\n", $worker->error());
exit(1);
}
$ret =$worker->add_function("addno", 0, \&addno, {});
#print"Function is $ret \n";
if ($ret != GEARMAN_SUCCESS)
{
printf(STDERR "%s\n", $worker->error());
exit(1);
}
my $count = 0;
while (1)
{
my $ret = $worker->work();
if ($ret != GEARMAN_SUCCESS)
{
printf(STDERR "%s\n", $worker->error());
last;
}
}
sub addno {
my ($job) = shift;
my $workload= $job->workload();
print"$workload \n";
}
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.