Merge pull request #155 from BrewCurious/master

Adding extension hooks before and after Solr tasks
This commit is contained in:
Robbie Averill 2017-11-14 15:56:04 +13:00 committed by GitHub
commit fc57daa45a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -227,6 +227,8 @@ class Solr_Configure extends Solr_BuildTask
{
parent::run($request);
$this->extend('updateBeforeSolrConfigureTask', $request);
// Find the IndexStore handler, which will handle uploading config files to Solr
$store = $this->getSolrConfigStore();
$indexes = Solr::get_indexes();
@ -244,6 +246,8 @@ class Solr_Configure extends Solr_BuildTask
if (isset($e)) {
exit(1);
}
$this->extend('updateAfterSolrConfigureTask', $request);
}
/**
@ -346,10 +350,14 @@ class Solr_Reindex extends Solr_BuildTask
{
parent::run($request);
$this->extend('updateBeforeSolrReindexTask', $request);
// Reset state
$originalState = SearchVariant::current_state();
$this->doReindex($request);
SearchVariant::activate_state($originalState);
$this->extend('updateAfterSolrReindexTask', $request);
}
/**