Inspect the next job in the list of buried jobs of the currently used tube.

@return object Pheanstalk_Job
321037
public function peekBuried()
	{
		$response = $this->_dispatch(
			new Pheanstalk_Command_PeekCommand(Pheanstalk_Command_PeekCommand::TYPE_BURIED)
		);

		return new Pheanstalk_Job($response['id'], $response['jobdata']);
	}
330949
public function nextBatchInLine($jobs_to_run, ...$from_channels)
    {
        if (!is_int($jobs_to_run)) {
            if (ctype_digit($jobs_to_run)) {
                $jobs_to_run = (int) $jobs_to_run;
            } else {
                throw new InvalidArgumentException('Jobs to run needs to be a number larger than zero');
            }
        }

        if ($jobs_to_run < 1) {
            throw new InvalidArgumentException('Jobs to run needs to be a number larger than zero');
        }

        $result = [];

        foreach ($this->reserveNextJobs($from_channels, $jobs_to_run) as $job_id) {
            $result[] = $this->getJobById($job_id);
        }

        return $result;
    }
1024811
private function _peek($tube, $method) {
        try {
            $job = $this->_client->useTube($tube)->{$method}();
            $peek = array(
                'id' => $job->getId(),
                'data' => $job->getData(),
                'stats' => $this->_client->statsJob($job));
        } catch (Exception $ex) {
            $peek = array();
        }
        if ($peek) {
            $peek['data'] = $this->_decodeDate($peek['data']);
        }
        return $peek;
    }
583831
protected function findNextStep() {
		// otherwise get next step in chain
		$currentStep = $this->CurrentStep();
		return $this
			->Steps()
			->filter("Status", "Queued")
			->filter("Order:GreaterThanOrEqual", $currentStep->Order)
			->exclude("ID", $currentStep->ID)
			->sort("Order ASC")
			->first();
	}
4724
public function next() {
		if ($this->_buffer) {
			list($this->_key, $this->_current) = array_shift($this->_buffer);
			return $this->_current;
		}

		if (!$next = $this->_fetch()) {
			$this->_key = null;
			$this->_current = null;
			$this->_valid = false;

			return null;
		} else {
			list($this->_key, $this->_current) = $next;
			$this->_valid = true;
		}
		return $this->_current;
	}
1254025
public function getNext()
    {
        $cursor = $this;
        $next = $this->retry(function() use ($cursor) {
            return $cursor->getMongoCursor()->getNext();
        }, false);
        if ($next instanceof \MongoGridFSFile) {
            $document = $next->file;
            $document['file'] = new GridFSFile($next);
            $next = $document;
        }
        return $next;
    }
501490
private JobStory getNextJobFiltered() throws IOException {
    while (true) {
      ZombieJob job = producer.getNextJob();
      if (job == null) {
        return null;
      }
      if (job.getOutcome() == Pre21JobHistoryConstants.Values.KILLED) {
        continue;
      }
      if (job.getNumberMaps() == 0) {
        continue;
      }
      if (job.getNumLoggedMaps() == 0) {
        continue;
      }
      return job;
    }
  }
384391
public function reserve()
    {
        $queues = $this->queues();
        if (!is_array($queues)) {
            return;
        }
        foreach ($queues as $queue) {
            $this->log(array('message' => 'Checking ' . $queue, 'data' => array('type' => 'check', 'queue' => $queue)), self::LOG_TYPE_DEBUG);
            $job = Resque_Job::reserve($queue);
            if ($job) {
                $this->log(array('message' => 'Found job on ' . $queue, 'data' => array('type' => 'found', 'queue' => $queue)), self::LOG_TYPE_DEBUG);
                return $job;
            }
        }

        return false;
    }
902861
public function next()
    {
        if ( ! $this->queryResult ||
             ! $this->queryResult->getAffectedRows() )
        {
            $this->currentSiteInfo = null;
            return null;
        }

        $this->restoreServices();
        $this->queryResult->next();
        return $this->createCurrentSiteInfo();
    }
1198595
public function getCurrentJob() : ?Job
    {
        $key = $this->getCurrentJobId();

        if (empty($key)) {
           return null;
        }

        return Job::Store()->getById($key);
    }
1206567
public function getNextFeed()
    {
        $nextLink = $this->getNextLink();
        if (!$nextLink) {
            require_once 'Zend/Gdata/App/HttpException.php';
            throw new Zend_Gdata_App_Exception('No link to next set ' .
            'of results found.');
        }
        $nextLinkHref = $nextLink->getHref();
        $service = new Zend_Gdata_App($this->getHttpClient());

        return $service->getFeed($nextLinkHref, get_class($this));
    }
664874
protected function NextItem()
	{
		while ( true )
		{
			if ( is_null( $this->iter ) )
			{
				if ( ! $this->baseIter->MoveNext() )
					return null;
				$this->sequentialPosition = 0;
				$this->iter = XPath2NodeIterator::Create( $this->node->Execute( new NodeProvider( $this->baseIter->getCurrent() ), $this->dataPool ) );
			}
			if ( $this->iter->MoveNext() )
			{
				$this->sequentialPosition++;
				return $this->iter->getCurrent();
			}
			$this->iter = null;
		}
	}
1232618
public function render()
    {
        $jobs = $this->createJobs();
        try {
            list($shouldSendRequest, $jobs) = $this->prepareRequest($jobs);
            if (!$shouldSendRequest) {
                return $this->fallback(null, $jobs);
            }
        } catch (\Exception $e) {
            return $this->fallback($e, $jobs);
        }

        try {
            return $this->makeRequest($jobs);
        } catch (\Exception $e) {
            return $this->fallback($e, $jobs);
        }
    }
1352382
public function dequeue()
    {
        $queues = $this->registry->all();

        if (null !== $this->prefix) {
            $wildcardQueue = $this;
            $queues = array_filter(
                $queues,
                function (QueueInterface $queue) use ($wildcardQueue) {
                    return (0 === strpos($queue->getName(), $wildcardQueue->getPrefix()));
                }
            );
        }

        ksort($queues);

        foreach ($queues as $queue) {
            if (null !== $job = $queue->dequeue()) {
                return $job;
            }
        }

        return null;
    }
540414
public function peek($jobId)
	{
		$response = $this->_dispatch(
			new Pheanstalk_Command_PeekCommand($jobId)
		);

		return new Pheanstalk_Job($response['id'], $response['jobdata']);
	}
647865
function nextService()
    {

        if ($this->services) {
            $this->_current = array_shift($this->services);
        } else {
            $this->_current = null;
        }

        return $this->_current;
    }
895754
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;
    }