public function dequeue() {
        if (!count($this->cached_jobs)) {
            $this->cached_jobs = $this->repo->getAvailableJobs($this->name);
        }
        if (!count($this->cached_jobs)) {
            return;
        }

        $job_row = array_shift($this->cached_jobs);
        $job = Job\WrappedJob::fromString($job_row['job'])->withAddedPayload([
            '_doctrine' => ['id' => $job_row['id']]
        ])->withQueueProvider('doctrine');
        $this->repo->processJob($job);
        return $job;
    }
public function dequeue() {
        if (!count($this->cached_jobs)) {
            $this->cached_jobs = $this->repo->getAvailableJobs($this->name);
        }
        if (!count($this->cached_jobs)) {
            return;
        }

        $job_row = array_shift($this->cached_jobs);
        $job = Job\WrappedJob::fromString($job_row['job'])->withAddedPayload([
            '_doctrine' => ['id' => $job_row['id']]
        ])->withQueueProvider('doctrine');
        $this->repo->processJob($job);
        return $job;
    }
public function dequeue ( ) { if ( ! count ( $ this -> cached_jobs ) ) { $ this -> cached_jobs = $ this -> repo -> getAvailableJobs ( $ this -> name ) ; } if ( ! count ( $ this -> cached_jobs ) ) { return ; } $ job_row = array_shift ( $ this -> cached_jobs ) ; $ job = Job \ WrappedJob :: fromString ( $ job_row [ 'job' ] ) -> withAddedPayload ( [ '_doctrine' => [ 'id' => $ job_row [ 'id' ] ] ] ) -> withQueueProvider ( 'doctrine' ) ; $ this -> repo -> processJob ( $ job ) ; return $ job ; }
take a job off of the queue
take a job off of the queue