Skip to content

Commit

Permalink
Fix $deliveryAt in RedisProducer::send by converting deliveryDelay mi…
Browse files Browse the repository at this point in the history
…lliseconds to seconds
  • Loading branch information
niels-nijens committed Jan 22, 2019
1 parent 20febeb commit 3bf5caa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion RedisProducer.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function send(Destination $destination, Message $message): void
$payload = $this->context->getSerializer()->toString($message);

if ($message->getDeliveryDelay()) {
$deliveryAt = time() + $message->getDeliveryDelay();
$deliveryAt = time() + $message->getDeliveryDelay() / 1000;
$this->context->getRedis()->zadd($destination->getName().':delayed', $payload, $deliveryAt);
} else {
$this->context->getRedis()->lpush($destination->getName(), $payload);
Expand Down

0 comments on commit 3bf5caa

Please sign in to comment.