Пример #1
0
 public function task()
 {
     $config = $this->config->item('base_config');
     $host = $config['gearman']['host'];
     $port = $config['gearman']['port'];
     $task = new GearmanTask();
     var_dump($task->taskDenominator());
     var_dump($task->taskNumerator());
 }
Пример #2
0
	/**
	 * Callback for getting updated status infromation from a worker
	 *
	 * @param GearmanTask $task
	 **/
	public function reverse_status($task)
	{
	    echo "STATUS: " . $task->jobHandle() . " - " . $task->taskNumerator() . 
	         "/" . $task->taskDenominator() . "\n";
	}