diff --git a/src/drivers/redis/Queue.php b/src/drivers/redis/Queue.php index 994d9e865f..c170dc47e5 100644 --- a/src/drivers/redis/Queue.php +++ b/src/drivers/redis/Queue.php @@ -162,10 +162,10 @@ protected function reserve($timeout) protected function moveExpired($from) { $now = time(); - if ($expired = $this->redis->zrevrangebyscore($from, $now, '-inf')) { + if ($expired = $this->redis->zrangebyscore($from, '-inf', $now)) { $this->redis->zremrangebyscore($from, '-inf', $now); foreach ($expired as $id) { - $this->redis->rpush("$this->channel.waiting", $id); + $this->redis->lpush("$this->channel.waiting", $id); } } }