From 709e40fc282ff7530546b5042756a1a2387bbd28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Mon, 19 Sep 2022 18:45:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kiri-engine/Pool/Pool.php | 1 + kiri-engine/Pool/SplQueue.php | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/kiri-engine/Pool/Pool.php b/kiri-engine/Pool/Pool.php index a26e676c..10decdcc 100644 --- a/kiri-engine/Pool/Pool.php +++ b/kiri-engine/Pool/Pool.php @@ -64,6 +64,7 @@ class Pool extends Component $connection->stopHeartbeatCheck(); } } + $this->logger->warning('channel status', $channel->stats()); } diff --git a/kiri-engine/Pool/SplQueue.php b/kiri-engine/Pool/SplQueue.php index c7410d1c..1c4e390f 100644 --- a/kiri-engine/Pool/SplQueue.php +++ b/kiri-engine/Pool/SplQueue.php @@ -72,7 +72,11 @@ class SplQueue implements QueueInterface public function stats(): array { // TODO: Implement stats() method. - return []; + return [ + 'consumer_num' => 0, + 'producer_num' => 0, + 'queue_num' => $this->length() + ]; }