src/Console/BaseCommand.php
protected function peekJob($tube, $state)
    {
        $peekMethod = 'peek'.ucfirst($state);

        try {
            return $this->getPheanstalk()->$peekMethod($tube);
        } catch (ServerException $e) {
            if ($this->isNotFoundException($e)) {
                return;
            }

            throw $e;
        }
    }
protected function peekJob($tube, $state)
    {
        $peekMethod = 'peek'.ucfirst($state);

        try {
            return $this->getPheanstalk()->$peekMethod($tube);
        } catch (ServerException $e) {
            if ($this->isNotFoundException($e)) {
                return;
            }

            throw $e;
        }
    }
Peek a job in a spesific state.

@param $tube
@param $state

@throws ServerException
@throws \Exception