getOverdueJobs example

public function getNextJob($force = false)
    {
        if ($force) {
            if (!$this->allJobsList) {
                $this->allJobsList = $this->getAllJobs();
            }

            return array_pop($this->allJobsList);
        }

        if (!$this->overdueJobsList) {
            $this->overdueJobsList = $this->getOverdueJobs();
        }

        while (($nextJob = array_pop($this->overdueJobsList)) !== null) {
            if ($this->isJobStillOverdue($nextJob->getId())) {
                return $nextJob;
            }
        }

        return null;
    }

    
Home | Imprint | This part of the site doesn't use cookies.