public function getJobCount($queue, $state) { if ($state === self::STATE_READY) { return $this->getRedis()->llen($this->getKeyReady($queue)); } return $this->getRedis()->zcount($this->getKey($queue, $state), '-inf', '+inf'); }