/** * Pop the next job off of the queue. * * @param string $queue * @return \Illuminate\Queue\Jobs\Job|null */ public function pop($queue = null) { $job = $this->pheanstalk->watchOnly($this->getQueue($queue))->reserve(0); if ($job instanceof Pheanstalk_Job) { return new BeanstalkdJob($this->container, $this->pheanstalk, $job); } }