protected function checkJobLimit()
    {
        // Make sure we don't run more than maxJobs jobs on this worker:
        $this->totalJobs++;

        if ($this->maxJobs != -1 && $this->maxJobs <= $this->totalJobs) {
            $this->stopWorker();
        }
    }
protected function checkJobLimit()
    {
        // Make sure we don't run more than maxJobs jobs on this worker:
        $this->totalJobs++;

        if ($this->maxJobs != -1 && $this->maxJobs <= $this->totalJobs) {
            $this->stopWorker();
        }
    }
protected function checkJobLimit ( ) { // Make sure we don't run more than maxJobs jobs on this worker: $ this -> totalJobs ++ ; if ( $ this -> maxJobs != - 1 && $ this -> maxJobs <= $ this -> totalJobs ) { $ this -> stopWorker ( ) ; } }
Checks if this worker has done the amount of jobs it is allowed to do, and if so tells it to stop
after this job completes.
Checks if this worker has done the amount of jobs it is allowed to do and if so tells it to stop after this job completes .