Revert "改名"

This reverts commit fdf58326
This commit is contained in:
2022-01-11 10:51:50 +08:00
parent 227aad2910
commit 47ed967e46
+3 -1
View File
@@ -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)) {