/** * Pop the next job off of the queue. * * @param string $queue * @return \Illuminate\Queue\Jobs\Job|null */ public function pop($queue = null) { $original = $queue ?: $this->default; $this->migrateAllExpiredJobs($queue = $this->getQueue($queue)); $job = $this->redis->lpop($queue); if (!is_null($job)) { $this->redis->zadd($queue . ':reserved', $this->getTime() + 60, $job); return new RedisJob($this->container, $this, $job, $original); } }