This commit is contained in:
2021-07-05 16:29:23 +08:00
parent 3e53f8d3c2
commit 2ea7289c43
+2 -2
View File
@@ -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();