Skip to content

Commit

Permalink
PDO based queues: Fix excessively low poll interval, and make it conf…
Browse files Browse the repository at this point in the history
…igurable (fix missed method signature)
  • Loading branch information
AllenJB committed Oct 20, 2021
1 parent f65432c commit b1ecdb7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/QueueInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function publish(QueueMessage $message, \DateTimeImmutable $delayTo = nul
/**
* @param callable $callback Callback with parameters: QueueInterface $this, QueueMessage
*/
public function consume(callable $callback, float $timeoutSecs, float $pollIntervalSecs): void;
public function consume(callable $callback, float $timeoutSecs, ?float $pollIntervalSecs): void;


public function ack(QueueMessage $message): void;
Expand Down
2 changes: 1 addition & 1 deletion src/Rabbit/RPCQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function publish(QueueMessage $message): PromiseInterface
}


public function consume(callable $callback, float $timeoutSecs): void
public function consume(callable $callback, float $timeoutSecs, ?float $pollIntervalSecs = null): void
{
$this->replyQueue->consume($callback, $timeoutSecs);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Rabbit/ReplyQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function publish(QueueMessage $message): PromiseInterface
}


public function consume(callable $callback, float $timeoutSecs): void
public function consume(callable $callback, float $timeoutSecs, ?float $pollIntervalSecs = null): void
{
$this->channel->consume(
function (BunnyMessage $message, Channel $channel, Client $client) use ($callback) {
Expand Down

0 comments on commit b1ecdb7

Please sign in to comment.