modify plugin name
This commit is contained in:
@@ -123,12 +123,12 @@ class Connection extends Component
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @return void
|
* @return array
|
||||||
* @throws Kiri\Exception\ConfigException
|
* @throws Kiri\Exception\ConfigException
|
||||||
*/
|
*/
|
||||||
public function check(string $name): void
|
public function check(string $name): array
|
||||||
{
|
{
|
||||||
$this->pool->check($name);
|
return $this->pool->check($name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -59,21 +59,26 @@ class Pool extends Component
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $name
|
* @param $name
|
||||||
* @return void
|
* @return array
|
||||||
* @throws ConfigException
|
* @throws ConfigException
|
||||||
*/
|
*/
|
||||||
public function check($name): void
|
public function check($name): array
|
||||||
{
|
{
|
||||||
$channel = $this->channel($name);
|
$channel = $this->channel($name);
|
||||||
|
$count = $success = 0;
|
||||||
|
|
||||||
$lists = [];
|
$lists = [];
|
||||||
while (($pdo = $channel->pop()) instanceof PDO) {
|
while (($pdo = $channel->pop()) instanceof PDO) {
|
||||||
$pdo->check();
|
$count += 1;
|
||||||
|
if ($pdo->check()) {
|
||||||
|
$success += 1;
|
||||||
|
}
|
||||||
$lists[] = $pdo;
|
$lists[] = $pdo;
|
||||||
}
|
}
|
||||||
foreach ($lists as $list) {
|
foreach ($lists as $list) {
|
||||||
$channel->push($list);
|
$channel->push($list);
|
||||||
}
|
}
|
||||||
|
return [$count, $success];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user