src/Model/Table/QueuedJobsTable.php
public function getLength($type = null) {
		$findConf = [
			'conditions' => [
				'completed IS' => null,
			],
		];
		if ($type !== null) {
			$findConf['conditions']['job_type'] = $type;
		}

		return $this->find('all', $findConf)->count();
	}
public function getLength($type = null) {
		$findConf = [
			'conditions' => [
				'completed IS' => null,
			],
		];
		if ($type !== null) {
			$findConf['conditions']['job_type'] = $type;
		}

		return $this->find('all', $findConf)->count();
	}
public function getLength ( $ type = null ) { $ findConf = [ 'conditions' => [ 'completed IS' => null , ] , ] ; if ( $ type !== null ) { $ findConf [ 'conditions' ] [ 'job_type' ] = $ type ; } return $ this -> find ( 'all' , $ findConf ) -> count ( ) ; }
Returns the number of items in the queue.
Either returns the number of ALL pending jobs, or the number of pending jobs of the passed type.

@param string|null $type Job type to Count
@return int
Returns the number of items in the queue . Either returns the number of ALL pending jobs or the number of pending jobs of the passed type .