gmc = new GearmanClient(); $this->queue = $queue; $this->gmc->addServer($server, $port); } /** * Fetch data from the api weather * @param mixed $data */ public function fetchApiData($data) { $this->gmc->doBackground('fetchApiData', json_encode($data)); } /** * insert trip weather with existing weather data * @param mixed $data */ public function processExistingWeatherData($data) { $this->gmc->doBackground('processExistingWeatherDataWorker', json_encode($data)); } }