From f2c8e68d946d05a6d46c57166d6d0fc914da8d0b Mon Sep 17 00:00:00 2001 From: PeteLuo <623849147@qq.com> Date: Sun, 23 Feb 2020 09:50:43 +0800 Subject: [PATCH] Update RedisTopicQueue.php (#46) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 处理不兼容php-redis5的问题(php-redis5已废弃lSize函数,当使用redis作为队列时,导致swoole:job无法启动)。php-redis废弃详情具体可查看:https://blog.csdn.net/xchenhao/article/details/97251618 --- src/Queue/RedisTopicQueue.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Queue/RedisTopicQueue.php b/src/Queue/RedisTopicQueue.php index 4a22d7e..8a1d04b 100644 --- a/src/Queue/RedisTopicQueue.php +++ b/src/Queue/RedisTopicQueue.php @@ -97,7 +97,7 @@ public function len($topic): int return 0; } - return (int) $this->queue->lSize($topic) ?? 0; + return (int) $this->queue->lLen($topic) ?? 0; } public function purge($topic)