composer
This commit is contained in:
@@ -8,7 +8,7 @@ use PhpAmqpLib\Connection\AMQPStreamConnection;
|
||||
use support\think\Db;
|
||||
use support\Log;
|
||||
|
||||
|
||||
define('AMQP_DEBUG', true);
|
||||
$host = config('cons.mq.host');
|
||||
$port = config('cons.mq.port');
|
||||
$user = config('cons.mq.user');
|
||||
@@ -83,6 +83,7 @@ use support\Log;
|
||||
};
|
||||
$rabbit_channel->basic_consume($queue, '', false, false, false, false, $callback);
|
||||
while ($rabbit_channel->is_consuming()) {
|
||||
Log::info('product.info.change.queue-MQ准备调用wait');
|
||||
$rabbit_channel->wait();
|
||||
}
|
||||
$rabbit_channel->close();
|
||||
|
||||
Reference in New Issue
Block a user