From 47ed967e46873078309529be755c447e2fa9a5f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Tue, 11 Jan 2022 10:51:50 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E6=94=B9=E5=90=8D"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit fdf58326 --- DatabasesProviders.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/DatabasesProviders.php b/DatabasesProviders.php index de78932..35bfd50 100644 --- a/DatabasesProviders.php +++ b/DatabasesProviders.php @@ -10,6 +10,7 @@ use Kiri\Abstracts\Providers; use Kiri\Application; use Kiri\Exception\ConfigException; use Kiri\Kiri; +use Kiri\Server\Events\OnTaskerStart; use Kiri\Server\Events\OnWorkerStart; /** @@ -27,6 +28,7 @@ class DatabasesProviders extends Providers public function onImport(Application $application) { $this->eventProvider->on(OnWorkerStart::class, [$this, 'createPool']); + $this->eventProvider->on(OnTaskerStart::class, [$this, 'createPool']); } @@ -45,7 +47,7 @@ class DatabasesProviders extends Providers * @throws ConfigException * @throws Exception */ - public function createPool(OnWorkerStart $onWorkerStart) + public function createPool(OnWorkerStart|OnTaskerStart $onWorkerStart) { $databases = Config::get('databases.connections', []); if (empty($databases)) {