This commit is contained in:
2021-07-05 16:00:25 +08:00
parent c545686b8f
commit 423d406f3e
+8 -1
View File
@@ -81,7 +81,14 @@ class ClientsPool extends Component
} else {
$min = Config::get('databases.pool.min', 1);
var_dump(array_keys(static::$_connections));
$num = [];
foreach (static::$_connections as $key => $channel) {
if (!isset($num[$key])) {
$num[$key] = 0;
}
$num[$key] += $channel->length();
}
var_dump($num);
// $length = $this->getChannel($name)->length();
// if ($length > $min) {