From 0bd71392325f54db87dcab7dc34a7161bb6dbaed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Fri, 18 Feb 2022 15:16:40 +0800 Subject: [PATCH] modify plugin name --- CreateConnectionPool.php | 8 ++++++++ DatabasesProviders.php | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 CreateConnectionPool.php diff --git a/CreateConnectionPool.php b/CreateConnectionPool.php new file mode 100644 index 0000000..8eba942 --- /dev/null +++ b/CreateConnectionPool.php @@ -0,0 +1,8 @@ +getEventProvider()->on(OnServerBeforeStart::class, [$this, 'createPool']); + $this->getEventProvider()->on(CreateConnectionPool::class, [$this, 'createPool']); } @@ -50,7 +50,7 @@ class DatabasesProviders extends Providers * @throws ConfigException * @throws Exception */ - public function createPool(OnBeforeCommandExecute $onWorkerStart) + public function createPool(OnServerBeforeStart $onWorkerStart) { $databases = Config::get('databases.connections', []); if (empty($databases)) {