Skip to content

Commit

Permalink
PHP: use a more modern way to check if a channel is open
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelklishin committed Apr 6, 2021
1 parent c654c2b commit 9e71f57
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion php/composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"require": {
"php-amqplib/php-amqplib": ">=v2.12.1"
"php-amqplib/php-amqplib": ">=3.0"
}
}
2 changes: 1 addition & 1 deletion php/receive.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

$channel->basic_consume('hello', '', false, true, false, false, $callback);

while ($channel->is_consuming()) {
while ($channel->is_open()) {
$channel->wait();
}

Expand Down
2 changes: 1 addition & 1 deletion php/receive_logs.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

$channel->basic_consume($queue_name, '', false, true, false, false, $callback);

while ($channel->is_consuming()) {
while ($channel->is_open()) {
$channel->wait();
}

Expand Down
2 changes: 1 addition & 1 deletion php/receive_logs_direct.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

$channel->basic_consume($queue_name, '', false, true, false, false, $callback);

while ($channel->is_consuming()) {
while ($channel->is_open()) {
$channel->wait();
}

Expand Down
2 changes: 1 addition & 1 deletion php/receive_logs_topic.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

$channel->basic_consume($queue_name, '', false, true, false, false, $callback);

while ($channel->is_consuming()) {
while ($channel->is_open()) {
$channel->wait();
}

Expand Down
2 changes: 1 addition & 1 deletion php/rpc_server.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function fib($n)
$channel->basic_qos(null, 1, null);
$channel->basic_consume('rpc_queue', '', false, false, false, false, $callback);

while ($channel->is_consuming()) {
while ($channel->is_open()) {
$channel->wait();
}

Expand Down
2 changes: 1 addition & 1 deletion php/worker.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
$channel->basic_qos(null, 1, null);
$channel->basic_consume('task_queue', '', false, false, false, false, $callback);

while ($channel->is_consuming()) {
while ($channel->is_open()) {
$channel->wait();
}

Expand Down

0 comments on commit 9e71f57

Please sign in to comment.