public function getLengthQueue($jobType = null) {
		$jobType = (string)$jobType;
		$queueLength = 0;
		$pendingStats = $this->getPendingStats();
		if (empty($pendingStats)) {
			return $queueLength;
		}

		foreach ($pendingStats as $pendingStatsItem) {
			if ((!empty($jobType) && (strcmp($pendingStatsItem[$this->alias]['jobtype'], $jobType) !== 0)) ||
				($pendingStatsItem[$this->alias]['status'] !== 'NOT_STARTED')) {
				continue;
			}

			$queueLength++;
		}

		return $queueLength;
	}