From 85277cd277d0355aacdf53a091f5491261b287e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Fri, 17 Jun 2022 14:04:23 +0800 Subject: [PATCH] modify plugin name --- kiri-engine/Pool/Connection.php | 2 -- kiri-engine/Pool/Pool.php | 12 ++++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/kiri-engine/Pool/Connection.php b/kiri-engine/Pool/Connection.php index c7d8a98c..498653b2 100644 --- a/kiri-engine/Pool/Connection.php +++ b/kiri-engine/Pool/Connection.php @@ -98,8 +98,6 @@ class Connection extends Component { $minx = Config::get('databases.pool.min', 1); - CoordinatorManager::utility($config['cds'])->yield(); - return $this->pool->get($config['cds'], $this->generate($config), $minx); } diff --git a/kiri-engine/Pool/Pool.php b/kiri-engine/Pool/Pool.php index 452b2aba..93e15c35 100644 --- a/kiri-engine/Pool/Pool.php +++ b/kiri-engine/Pool/Pool.php @@ -64,14 +64,18 @@ class Pool extends Component */ public function check($name): void { - CoordinatorManager::utility($name)->waite(); - $channel = $this->channel($name); + + $lists = []; while (($pdo = $channel->pop()) instanceof PDO) { $pdo->check(); - } - CoordinatorManager::utility($name)->done(); + $lists[] = $pdo; + + } + foreach ($lists as $list) { + $channel->push($list); + } }