504 Gateway Time-out on calling gearman runTasks
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Gearman |
New
|
Undecided
|
Unassigned |
Bug Description
My gearman client code is as below:
-------
`class FNSGearman {
public $gmclient;
public $taskCount = 0;
public static $results = array();
public static function reset(){
GearmanResults:
}
public static function completeCallbac
$unique = $task->unique();
if ($unique != null) {
FNSGearman:
}else {
array_push(
}
}
public function addTask($func_name, $arguments, $context = null, $uid = null) {
$this->taskCount++;
$this->
if ($this->taskCount == MAX_GEARMAN_TASKS) {
$this->
$this->taskCount = 0;
}
}
public function runTasks() {
var_dump(
if ($this->taskCount > 0)
{
/echo $this->
if (! $this->
{
echo "ERROR " . $this->
exit;
}/
try {
// run the tasks in parallel (assuming multiple workers)
$this->
} catch (GearmanException $e) {
var_dump($e);
}
}
}
public function __construct() {
echo 'FNSGearman construct called.....';
$this->gmclient= new GearmanClient();
/* add the default server */
//$this-
$this->
$this->
}
}`
-------
When I call runTasks it hangs my application execution
-------
`$gm = new FNSGearman();
//$cdt = new FNSDateTime(
//echo "1st timestamp: ".$cdt-
//echo "1st timestamp: ".time()."<br>";
$tcount = count ( $trackers );
for ($i = 0, $counter = 0; $i < $tcount; $i++, $counter++) {
$arguments = array('tid' => $trackers[$i], 'ts' => $timestamps, 'session' => $_SESSION);
//print_
$gm-
}
$gm->runTasks();`