disable hooks while rebuild
This commit is contained in:
@@ -38,7 +38,6 @@ class DataManager
|
||||
|
||||
private $cachePath = 'data/cache';
|
||||
|
||||
|
||||
public function __construct(Container $container)
|
||||
{
|
||||
$this->container = $container;
|
||||
@@ -58,6 +57,8 @@ class DataManager
|
||||
{
|
||||
$result = $this->clearCache();
|
||||
|
||||
$this->disableHooks();
|
||||
|
||||
$this->populateConfigParameters();
|
||||
|
||||
$result &= $this->rebuildMetadata();
|
||||
@@ -66,6 +67,8 @@ class DataManager
|
||||
|
||||
$this->rebuildScheduledJobs();
|
||||
|
||||
$this->enableHooks();
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
@@ -228,4 +231,14 @@ class DataManager
|
||||
|
||||
$config->save();
|
||||
}
|
||||
|
||||
protected function disableHooks()
|
||||
{
|
||||
$this->getContainer()->get('hookManager')->disable();
|
||||
}
|
||||
|
||||
protected function enableHooks()
|
||||
{
|
||||
$this->getContainer()->get('hookManager')->enable();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user