From 2ea7289c43dba4ef9b897b257174a285f1715956 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 5 Jul 2021 16:29:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- System/Pool/ClientsPool.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/System/Pool/ClientsPool.php b/System/Pool/ClientsPool.php index fccd0554..94687995 100644 --- a/System/Pool/ClientsPool.php +++ b/System/Pool/ClientsPool.php @@ -9,6 +9,7 @@ use JetBrains\PhpStorm\Pure; use Snowflake\Abstracts\Component; use Snowflake\Abstracts\Config; use Snowflake\Exception\ConfigException; +use Snowflake\Snowflake; use Swoole\Coroutine; use Swoole\Coroutine\Channel; use Swoole\Timer; @@ -91,8 +92,7 @@ class ClientsPool extends Component $this->flush($channel, $min); } $num[$key] += $channel->length(); - - if (str_starts_with($key, 'Mysql')) { + if (str_starts_with($key, 'Mysql') && (Snowflake::isWorker() || Snowflake::isTask())) { $this->debug('Worker #' . env('worker') . ' use client -> ' . $key . ':' . $total); } $total += $channel->length();