src/DataCollector/PheanstalkDataCollector.php
private function fetchJobs(PheanstalkInterface $pheanstalk, $tubeName)
    {
        try {
            $nextJobReady = $pheanstalk->peekReady($tubeName);

            $this->data['jobs'][$tubeName]['ready'] = [
                'id'   => $nextJobReady->getId(),
                'data' => $nextJobReady->getData(),
            ];
        } catch (ServerException $e) {
        }

        try {
            $nextJobBuried = $pheanstalk->peekBuried($tubeName);

            $this->data['jobs'][$tubeName]['buried'] = [
                'id'   => $nextJobBuried->getId(),
                'data' => $nextJobBuried->getData(),
            ];
        } catch (ServerException $e) {
        }
    }
private function fetchJobs(PheanstalkInterface $pheanstalk, $tubeName)
    {
        try {
            $nextJobReady = $pheanstalk->peekReady($tubeName);

            $this->data['jobs'][$tubeName]['ready'] = [
                'id'   => $nextJobReady->getId(),
                'data' => $nextJobReady->getData(),
            ];
        } catch (ServerException $e) {
        }

        try {
            $nextJobBuried = $pheanstalk->peekBuried($tubeName);

            $this->data['jobs'][$tubeName]['buried'] = [
                'id'   => $nextJobBuried->getId(),
                'data' => $nextJobBuried->getData(),
            ];
        } catch (ServerException $e) {
        }
    }
private function fetchJobs ( PheanstalkInterface $ pheanstalk , $ tubeName ) { try { $ nextJobReady = $ pheanstalk -> peekReady ( $ tubeName ) ; $ this -> data [ 'jobs' ] [ $ tubeName ] [ 'ready' ] = [ 'id' => $ nextJobReady -> getId ( ) , 'data' => $ nextJobReady -> getData ( ) , ] ; } catch ( ServerException $ e ) { } try { $ nextJobBuried = $ pheanstalk -> peekBuried ( $ tubeName ) ; $ this -> data [ 'jobs' ] [ $ tubeName ] [ 'buried' ] = [ 'id' => $ nextJobBuried -> getId ( ) , 'data' => $ nextJobBuried -> getData ( ) , ] ; } catch ( ServerException $ e ) { } }
Get the next job ready and buried in the specified tube and connection.

@param PheanstalkInterface $pheanstalk
@param string              $tubeName
Get the next job ready and buried in the specified tube and connection .