@@ -196,25 +196,25 @@ public function pop(float $timeout = -1): ?IMessage
196196 $ this ->parseTimeoutMessages ();
197197 $ redis = RedisManager::getInstance ($ this ->poolName );
198198 $ result = $ redis ->evalEx (<<<LUA
199- -- 从列表弹出
200- local messageId = redis.call('lpop', KEYS[1])
201- if false == messageId then
202- return -1
203- end
204- -- 获取消息内容
205- local hashResult = redis.call('hgetall', KEYS[3] .. messageId)
206- local message = {}
207- for i=1,#hashResult,2 do
208- message[hashResult[i]] = hashResult[i + 1]
209- end
210- -- 加入工作队列
211- local score = tonumber(message.workingTimeout)
212- if nil == score or score <= 0 then
213- score = -1
214- end
215- redis.call('zadd', KEYS[2], ARGV[1] + score, messageId)
216- return hashResult
217- LUA
199+ -- 从列表弹出
200+ local messageId = redis.call('lpop', KEYS[1])
201+ if false == messageId then
202+ return -1
203+ end
204+ -- 获取消息内容
205+ local hashResult = redis.call('hgetall', KEYS[3] .. messageId)
206+ local message = {}
207+ for i=1,#hashResult,2 do
208+ message[hashResult[i]] = hashResult[i + 1]
209+ end
210+ -- 加入工作队列
211+ local score = tonumber(message.workingTimeout)
212+ if nil == score or score <= 0 then
213+ score = -1
214+ end
215+ redis.call('zadd', KEYS[2], ARGV[1] + score, messageId)
216+ return hashResult
217+ LUA
218218 , [
219219 $ this ->getQueueKey (QueueType::READY ),
220220 $ this ->getQueueKey (QueueType::WORKING ),
0 commit comments