bhupeshwalde has asked for the wisdom of the Perl Monks concerning the following question:

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"; }

Replies are listed 'Best First'.
Re: perl gearman job queue
by bhupeshwalde (Novice) on May 18, 2011 at 09:00 UTC
    I solved it.I re-downloaded modules.Now it's working fine but facing some other problem.let me try to solve it, if not able to solve one more question i will post. Thanks