modify plugin name
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Database;
|
||||||
|
|
||||||
|
class CreateConnectionPool
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -31,7 +31,7 @@ class DatabasesProviders extends Providers
|
|||||||
*/
|
*/
|
||||||
public function onImport(Application $application)
|
public function onImport(Application $application)
|
||||||
{
|
{
|
||||||
$this->getEventProvider()->on(OnServerBeforeStart::class, [$this, 'createPool']);
|
$this->getEventProvider()->on(CreateConnectionPool::class, [$this, 'createPool']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ class DatabasesProviders extends Providers
|
|||||||
* @throws ConfigException
|
* @throws ConfigException
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function createPool(OnBeforeCommandExecute $onWorkerStart)
|
public function createPool(OnServerBeforeStart $onWorkerStart)
|
||||||
{
|
{
|
||||||
$databases = Config::get('databases.connections', []);
|
$databases = Config::get('databases.connections', []);
|
||||||
if (empty($databases)) {
|
if (empty($databases)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user