Skip to content

Commit adc5894

Browse files
committed
修复工作消息时间不正确的问题
1 parent f58dfa5 commit adc5894

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Driver/RedisQueueDriver.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,14 @@ public function pop(): ?IMessage
184184
if nil == score or score <= 0 then
185185
score = -1
186186
end
187-
redis.call('zadd', KEYS[2], score, messageId)
187+
redis.call('zadd', KEYS[2], ARGV[1] + score, messageId)
188188
return hashResult
189189
LUA
190190
, [
191191
$this->getQueueKey(QueueType::READY),
192192
$this->getQueueKey(QueueType::WORKING),
193193
$this->getMessageKeyPrefix(),
194+
microtime(true),
194195
], 3);
195196

196197
if(-1 === $result)

0 commit comments

Comments
 (0)