diff --git a/src/drivers/redis/Queue.php b/src/drivers/redis/Queue.php index 994d9e865f..9dbf93edf4 100644 --- a/src/drivers/redis/Queue.php +++ b/src/drivers/redis/Queue.php @@ -73,10 +73,6 @@ public function run($repeat, $timeout = 0) */ public function status($id) { - if (!is_numeric($id) || $id <= 0) { - throw new InvalidArgumentException("Unknown message ID: $id."); - } - if ($this->redis->hexists("$this->channel.attempts", $id)) { return self::STATUS_RESERVED; } @@ -191,7 +187,7 @@ protected function pushMessage($message, $ttr, $delay, $priority) throw new NotSupportedException('Job priority is not supported in the driver.'); } - $id = $this->redis->incr("$this->channel.message_id"); + $id = uniqid('', true); $this->redis->hset("$this->channel.messages", $id, "$ttr;$message"); if (!$delay) { $this->redis->lpush("$this->channel.waiting", $id);