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)) {