/** * * @throws QueueIsDraining If the Queue is Drainable * * @param string $message * @param array $options Message options (override Queue options): * * @return string Unique ID along the queue */ protected function doEnqueue($message, $options = []) { // Score has form <priority>.<timestamp> $score = isset($options['score']) ? $options['score'] : 0; if ($priority = $this->getOption('priority', false, $options)) { $score += $priority; } $this->redis->zAdd($this->queueKey, $score, $message); }