Пример #1
0
 /**
  * Get GearmanClient
  *
  * @return \GearmanClient
  */
 public function getGearmanClient()
 {
     if (!$this->client) {
         $this->client = new \GearmanClient();
     }
     if ($this->timeout !== null) {
         $this->client->setTimeout($this->timeout);
     }
     if ($this->context !== null) {
         $this->client->setContext($this->context);
     }
     return $this->client;
 }