This commit is contained in:
2021-04-02 18:40:50 +08:00
parent 98986ffe9d
commit bdd9f4008f
7 changed files with 40 additions and 43 deletions
-13
View File
@@ -35,19 +35,6 @@ class DatabasesProviders extends Providers
$event = Snowflake::app()->getEvent();
$event->on(Event::SERVER_WORKER_START, [$this, 'createPool']);
$event->on(Event::SERVER_WORKER_START, [$this, 'scanModel']);
$event->on(Event::SERVER_TASK_START, [$this, 'scanModel']);
}
/**
* @throws ComponentException
*/
public function scanModel()
{
annotation()->instanceDirectoryFiles(MODEL_PATH);
}