Skip to content

Commit

Permalink
at leat once msg consume
Browse files Browse the repository at this point in the history
The host may crashed before`rpush` was executed
  • Loading branch information
noname007 committed May 22, 2024
1 parent caf3cb8 commit 8f4b60f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/drivers/redis/Queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@ protected function moveExpired($from)
{
$now = time();
if ($expired = $this->redis->zrevrangebyscore($from, $now, '-inf')) {
$this->redis->zremrangebyscore($from, '-inf', $now);
foreach ($expired as $id) {
$this->redis->rpush("$this->channel.waiting", $id);
}
$this->redis->zremrangebyscore($from, '-inf', $now);
}
}

Expand Down

0 comments on commit 8f4b60f

Please sign in to comment.