public function monitorQueue() : bool
    {
        if ($this->jobsInQueue === 0) {
            return true;
        }
        foreach (array_keys($this->jobQueues) as $jobName) {
            if (empty($this->jobQueues[$jobName])) {
                continue;
            }
            if ($this->jobCanBeProcessed($jobName)) {
                continue;
            }
            $jobsCount = count($this->jobQueues[$jobName]);
            $this->jobQueues[$jobName] = [];
            $this->jobsInQueue -= $jobsCount;
        }
        return $this->pushJobs();
    }
public function monitorQueue() : bool
    {
        if ($this->jobsInQueue === 0) {
            return true;
        }
        foreach (array_keys($this->jobQueues) as $jobName) {
            if (empty($this->jobQueues[$jobName])) {
                continue;
            }
            if ($this->jobCanBeProcessed($jobName)) {
                continue;
            }
            $jobsCount = count($this->jobQueues[$jobName]);
            $this->jobQueues[$jobName] = [];
            $this->jobsInQueue -= $jobsCount;
        }
        return $this->pushJobs();
    }
public function monitorQueue ( ) : bool { if ( $ this -> jobsInQueue === 0 ) { return true ; } foreach ( array_keys ( $ this -> jobQueues ) as $ jobName ) { if ( empty ( $ this -> jobQueues [ $ jobName ] ) ) { continue ; } if ( $ this -> jobCanBeProcessed ( $ jobName ) ) { continue ; } $ jobsCount = count ( $ this -> jobQueues [ $ jobName ] ) ; $ this -> jobQueues [ $ jobName ] = [ ] ; $ this -> jobsInQueue -= $ jobsCount ; } return $ this -> pushJobs ( ) ; }
Cleanup jobs that are not handled correctly for some reason.

@return bool
Cleanup jobs that are not handled correctly for some reason .